Question: double sales, commission; string inputString; constint LOWSALES = 1 0 0 0 ; constint MEDSALES = 5 0 0 0 ; constint HIGHSALES = 1

double sales, commission;
string inputString;
constint LOWSALES =1000;
constint MEDSALES =5000;
constint HIGHSALES =10000;
constdouble LOWPCT =0.05;
constdouble MEDPCT =0.07;
constint BONUS1=1000;
constint BONUS2=1500;
Console.WriteLine("What was the sales amount? ");
inputString = Console.ReadLine();
sales = Convert.ToDouble(inputString);
commission = sales * LOWPCT;
if(sales > LOWSALES)
commission +=(sales - LOWSALES)* MEDPCT;
else
if(sales >= MEDSALES)
commission += BONUS1;
else
if(sales > HIGHSALES)
commission += BONUS2;
Console.WriteLine("Sales: {0}
Commission: {1}",
sales.ToString("C"), commission.ToString("C"));
The file DebugFour4.cs has syntax and/or logical errors. Determine the problem(s), and fix the program.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!