469,658 Members | 1,862 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,658 developers. It's quick & easy.

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 ?

Expand|Select|Wrap|Line Numbers
  1. Public Class Form1
  2.  
  3.     Private Sub btnCalculate_Click(sender As Object, e As EventArgs) Handles btnCalculate.Click
  4.         'This application should calculate and display the total of the software
  5.  
  6.  
  7.         Const intPackageA As Integer = 99  'Package A
  8.         Const intPackageB As Integer = 199 'Package B
  9.         Const intPackageC As Integer = 299 'Package C
  10.  
  11.  
  12.  
  13.         'Declaring the local variables
  14.         Dim declbl1 As Decimal
  15.         Dim decdiscount As Decimal
  16.         Dim intA As Integer
  17.         intA = CInt(txtA.Text)
  18.         Dim intAmount As Integer
  19.  
  20.  
  21.         Select Case intPackageA
  22.             Case 0 To 9
  23.                 decdiscount = 0D
  24.  
  25.             Case Is >= 19
  26.                 decdiscount = 0.2D
  27.  
  28.             Case 20 To 49
  29.                 decdiscount = 0.3D
  30.  
  31.             Case 50 To 99
  32.                 decdiscount = 0.4D
  33.  
  34.             Case Is >= 100
  35.                 decdiscount = 0.5D
  36.         End Select
  37.  
  38.         declbl1 = (intA * intPackageA) * decdiscount
Nov 15 '14 #1
2 4097
twinnyfo
3,653 Expert Mod 2GB
We do not assist with homework assignments on this forum.
Nov 19 '14 #2
Expand|Select|Wrap|Line Numbers
  1. Case Is >= 19
  2.  
May not be what you want.
Nov 20 '14 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by BRUCE WILLIS via DotNetMonster.com | last post: by
1 post views Thread by Davef | last post: by
1 post views Thread by punkybrewster | last post: by
2 posts views Thread by harika6 | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.