Softwares Sales Program

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jah1992
    New Member
    • Nov 2014
    • 2

    Softwares Sales Program

    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 ?

    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
  • twinnyfo
    Recognized Expert Moderator Specialist
    • Nov 2011
    • 3662

    #2
    We do not assist with homework assignments on this forum.

    Comment

    • onlinetuition
      New Member
      • Oct 2014
      • 10

      #3
      Code:
      Case Is >= 19
      May not be what you want.

      Comment

      Working...