473,233 Members | 1,477 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,233 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 4297
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: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.