GJSNeptune
[H]F Junkie
- Joined
- Mar 31, 2004
- Messages
- 12,372
My class is finally done with logic planning, and now we're touching on VB. My homework doesn't require this simple program to actually continue, but it bugs me that it wants my output to include Press the ENTER key to continue, yet it simply exits.
Is there a relatively simply way for this to reset when the user hits ENTER to continue?
Is there a relatively simply way for this to reset when the user hits ENTER to continue?
Code:
Sub Main()
Dim decCustSubTotal As Decimal
Dim decCustSalesTax As Decimal
Dim decCustNetTotal As Decimal
' Accept the subtotal of the order
Console.Write("Enter the order amount: ")
decCustSubTotal = Console.ReadLine()
' Calculate sales tax and net total
decCustSalesTax = decCustSubTotal * 0.06
decCustNetTotal = decCustSubTotal + decCustSalesTax
' Write results to the console
Console.WriteLine()
Console.WriteLine("Subtotal : " + decCustSubTotal.ToString("F2"))
Console.WriteLine("Sales Tax: " + decCustSalesTax.ToString("F2"))
Console.WriteLine("----------")
Console.WriteLine("Net Total: " + decCustNetTotal.ToString("F2"))
Console.WriteLine()
Console.Write("Press the ENTER key to continue.")
Console.Read()
End Sub