473,406 Members | 2,281 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,406 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 4311
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: 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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.