Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Module Module1
- Sub Main()
- 'COMPUTE THE 5% DISCOUNT FROM A GIVEN PRICE
- Dim price As Double
- Dim discount As Double
- Dim discount_percentage As Double
- Console.Write("Please enter the Item price: $")
- price = Console.ReadLine
- Console.Write("Enter the discount: ")
- discount_percentage = Console.ReadLine
- 'discount_percentage = discount_percentage / 100
- discount_percentage /= 100
- discount = price * discount_percentage
- Console.WriteLine("The discount for the price of $" & price _
- & " is $" & discount)
- Console.WriteLine("The final price for the item is: $" & price - discount)
- Console.ReadKey()
- End Sub
- End Module
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement