quakeworld2007
Member
- Joined
- Sep 19, 2007
- Messages
- 7
- Programming Experience
- Beginner
I have two textboxes, one i want the user to enter the # of hamburgers they want and the other to input the # of fries they want. I also have a button that will output the amount along with the sales tax.
How do I get the button to output the amount and sales tax.
How do I get the button to output the amount and sales tax.
VB.NET:
Public Class Form1
Dim numberofburgers As Integer
Dim numberoffries As Integer
Dim burgerPrice As Double = 8.99
Dim fryPrice As Double = 0.99
Dim taxRate As Double = 0.01
Dim TotalAmount As Double = ((numberofburgers * burgerPrice) + numberoffries * fryPrice)
Dim salesTaxAmount As Double = TotalAmount * taxRate
Dim amountDue As Double = salesTaxAmount + TotalAmount
Private Sub order_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TotalAmount.Click
Console.WriteLine("Total Amount is " & TotalAmount)
Console.WriteLine("Sales Tax Amount is " & salesTaxAmount)
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
End Sub
Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox2.TextChanged
End Sub
Private Sub order_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles order.Click
End Sub
End Class
Last edited by a moderator: