Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

In C# create a console application that will accept sales information and calcul

ID: 3672526 • Letter: I

Question

In C# create a console application that will accept sales information and calculate the total commissions for a realtor. Commissions are based on the price of the house sold.

Sale price:

Commission percent

< $100K 5%

$100K to $250K 6%

>$250K 7%

Commission is calculated as sales price *commission %. The application should use a sentinel controlled loop to prompt the user for home sales prices for a realtor. Identify the correct commission for each house then Calculate the commission for the sales rep. Test with sets of data for at least 3 sales reps. Output the sales rep commission for each of the sales and the total of all commissions.

Explanation / Answer

class Program
{

static void Main(string[] args)
{

int number, percentage=0, option;
float result;
label:
Console.Write(" Enter Sale price :");
number = Convert.ToInt32(Console.ReadLine());

if (number < 100)
{
percentage = 5;
}
else if (number >= 100 && number<=250)
{
percentage = 6;
}
else
{
percentage = 7;
}   
result = (float)(number * percentage) / 100;
Console.WriteLine("Commission Percentage value is: {0}","$"+" "+result);
Console.Write(" Calculate again press 1.To quit press digit:");
option = Convert.ToInt32(Console.ReadLine());
if (option == 1)
{
goto label;
}
Console.WriteLine("Press Enter for quit");
Console.ReadLine();
}
}