473,399 Members | 2,146 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

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 4310
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

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

Similar topics

0
by: BRUCE WILLIS via DotNetMonster.com | last post by:
Hello architectural, engineer and technical users! We can offer you new regi stered CAD/CAM/CAE softwares: Survey , GIS , Rock , Soil and Water, Industri al and Control Project, Mathematics ,...
1
by: Davef | last post by:
Scenario: I keep all the sales in a table with an id to a contact table, but if I delete the contact, the sales information is wrong. What is the best way to do this? -- ...
2
by: Ahmed | last post by:
Hello everyone, I am designing a chat program for a company. The program will be used locally(through lan). I am progamming the chat program using VB.NET windows application. Lets consider the...
5
by: Wired Hosting News | last post by:
I tried to be breif and give a scenario so as not to be overlooked because it was soooo long. Let me give you real world. I am a manufacturer of goods and produce 11 items that are distributed...
1
by: punkybrewster | last post by:
Basically my task is to write a program that computes and displays the weekly salaries of a company's salespeople based upon information entered by the user and that also displays the total for the...
1
by: klubbhead | last post by:
This part of my program needs to read from 4 parameter files and then displays them on the screen by clicking a different radio button. The program itself works, but my professor says that I have to...
7
by: rohitsripathi | last post by:
i need help writing this program... i am in college and i do not have time do this right now as i need to study for another test....but this is due tonight...i will pay $5 if you accept to do it and...
2
by: harika6 | last post by:
hi friends!! java program to retreive all softwares installed in the system as an output i.e all the softwares that are in add or remove programs.
4
by: wutang | last post by:
Create a program that displays the sum of the sales amounts made in each of four regions (North, South, East, West) during a three month period. The program should display the total sales made during...
1
by: Reggraw | last post by:
My program is supposed to output a list of users who input their sales name along with their sales amount and then print out a display. I am using a nested for loop to read through the list of...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.