code
An Internet service provider has three different subscription packages for its customers: Package A: For $9.95 per month 10 hours of access are provided. Additional hours are $2.00 per hour. Package B: For $13.95 per month 20 hours of access are provided. Additional hours are $1.00 per hour. Package C: For $19.95 per month unlimited access is provided. Write a
Using Visual Basic I need help finishing this code this is what I got so far
Dim decpackageA As Decimal
Dim decpackageA1 As Decimal
Dim decpackageB As Decimal
Dim decpackageB1 As Decimal
Dim decpackageC As Decimal
Dim inthours_worked As Integer
Dim dectotal_chargespackageA As Decimal
Dim dectotal_chargespackageB As Decimal
Dim dectotal_chargespackageC As Decimal
Dim dbltotal_charges As Double
'Assign the textbox values to variables
decpackageA = inthours_worked < 10 = 9.95
decpackageA1 = inthours_worked > 10 = 9.95 * 2
decpackageB = inthours_worked < 20 = 14.95
decpackageB1 = inthours_worked > 20 = 14.95 * 1
decpackageC = inthours_worked > 0 = 19.95
dectotal_chargespackageA = decpackageA Or decpackageA1
dectotal_chargespackageB = decpackageB Or decpackageB1
dectotal_chargespackageC = decpackageC
TextBox3.Text = "$" + dbltotal_charges.ToString()
TextBox3.Text = "$" + decpackageA.ToString()
TextBox3.Text = "$" + decpackageB.ToString()
TextBox3.Text = "$" + decpackageC.ToString()
TextBox3.Text = "$" + dectotal_chargespackageA.ToString()
TextBox3.Text = "$" + dectotal_chargespackageB.ToString()
TextBox3.Text = "$" + dectotal_chargespackageC.ToString()
I keep getting 0 as the total charges where did I go wrong im using visual basic
Trending now
This is a popular solution!
Step by step
Solved in 4 steps