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

Please help. I\'m using VS2015 (C#) Create an application that will accept sales

ID: 3670000 • Letter: P

Question

Please help. I'm using VS2015 (C#)

Create an 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

using System;

class program{

      static void main()

           {

                    int i=3,sum=0;

   while(i>3)

{

                                Console.WriteLine("enter the values of sales");

                                 int comission,sales;

                                String value=Console.ReadLine();

                                    if(int.TryParse(value ,out sales)

                                         {

                                                        if(sales < 100000)

                                                              comission =5;

                                                       else if(sales >=100000 && sales <=250000)

                                                              comission=6;

                                                       else if(sales >=250000)

                                                              comission =7;

                                                       else

                                                               continue;

                                                    Console.Write("sales");

                                                     Console.writeln(sales);

                                                  sum=sum+((sales/100)*(comission));

                                                   i--;

                                          }

                                     else

                                        {

                                                continue;

                                          }

   Console.Writeln("total of all commissions");

Console.write(sum);   

}

                   

           }

}