Notifications
Clear all

Product Discount

Page 1 / 5

Posts: 0
Topic starter
(@Legless)
New RivalGamer
Joined: 10 years ago

This little program is basically something that totals up the cost of your product and takes off the discount and returns the grand total. It calculates it all by a user inputting their Product's name, price and the discount rate. It's not the best as it's not got much to it, in terms of color and format. Here's my beauty: xLust <3


Antivirus scan for a344c88d704b20f7df0170a079906b6acedb7e52d2e673f91afb62aaa00aa7e4 at2014-09-15 2024 UTC - VirusTotal
Online Virus Scanner
']Dropbox - Percentage.rar

' Declare variables to be used in addition calculation
	        Dim ProductPrice, DiscountRate, Quantity, GrandTotal, Discount As Integer
	        Dim ProductName As String
	        Dim SubTotal As Decimal
	        Dim FinalDiscount As Double
	        ' Input Product Name
	        Console.Write("Please input the product's name: ")
	        ProductName = Console.ReadLine()
	        Console.WriteLine()
	
	        ' Input Product's Price
	        Console.Write("Please input the product's price: £")
	        ProductPrice = Console.ReadLine()
	        Console.WriteLine()
	
	        ' Input Discount Rate
	        Console.Write("Please input the discount rate: %")
	        DiscountRate = Console.ReadLine()
	        Console.WriteLine()
	
	        ' Input Quantity
	        Console.Write("Please input the quantity: ")
	        Quantity = Console.ReadLine()
	        Console.WriteLine()
	
	        ' Sub Total
	        SubTotal = ProductPrice * Quantity
	
	        ' Discount
	        Discount = DiscountRate * SubTotal / 100
	        FinalDiscount = ProductPrice - Discount
	
	        ' Grand Total
	        GrandTotal = SubTotal - Discount
	
	        ' Display Results
	        Console.WriteLine()
	        Console.WriteLine("The sub total £" & SubTotal)
	        Console.WriteLine("The discount is £" & Discount)
	        Console.WriteLine("The grand total of " & ProductName & " is £" & GrandTotal)
	
	        ' Hold display line for viewing
	        Console.ReadLine()
Reply
Name of the Video Game, and any other Tags
22 Replies
Posts: 0
 Zeus
(@Zeus)
New RivalGamer
Joined: 10 years ago

-Snip-

Nice little programme buddy! I am sure some members will find this useful(y)

Reply
Posts: 0
 Anonymous
Guest
(@Anonymous)
Joined: 1 second ago

Wow This Looks Cool !

Reply
Posts: 0
Topic starter
(@Legless)
New RivalGamer
Joined: 10 years ago

Nice little programme buddy! I am sure some members will find this useful(y)

Thank you, calculator is probably easier hahaha.
This time by next year, I would have built a fully functioning ATM machine with about 400 lines of code, with design and format.

Reply
Posts: 0
Topic starter
(@Legless)
New RivalGamer
Joined: 10 years ago

Wow This Looks Cool !

It's Amazing right? 🙂

Reply
Page 1 / 5