Hi,
I am trying to create this software sales program for class. This is my first programming course. I cannot get my program to calculate correctly. What am i doing wrong ?
I am trying to create this software sales program for class. This is my first programming course. I cannot get my program to calculate correctly. What am i doing wrong ?
Code:
Public Class Form1
Private Sub btnCalculate_Click(sender As Object, e As EventArgs) Handles btnCalculate.Click
'This application should calculate and display the total of the software
Const intPackageA As Integer = 99 'Package A
Const intPackageB As Integer = 199 'Package B
Const intPackageC As Integer = 299 'Package C
'Declaring the local variables
Dim declbl1 As Decimal
Dim decdiscount As Decimal
Dim intA As Integer
intA = CInt(txtA.Text)
Dim intAmount As Integer
Select Case intPackageA
Case 0 To 9
decdiscount = 0D
Case Is >= 19
decdiscount = 0.2D
Case 20 To 49
decdiscount = 0.3D
Case 50 To 99
decdiscount = 0.4D
Case Is >= 100
decdiscount = 0.5D
End Select
declbl1 = (intA * intPackageA) * decdiscount
Comment