0% found this document useful (0 votes)
44 views5 pages

SUBMITTED TO: Ma'am Misbah SUBMITTED BY: Aiman Rizwan ROLL NO: Info-Tech 16010 Department: Bs It Semeter: 6

The document is a C# program that calculates sales commission for a salesperson. It takes in the salesperson's name and monthly sales amount as input. It then determines the commission rate based on the sales amount and calculates the commission. It also takes the salary as input and calculates the total salary by adding the commission and salary. The program outputs the name, commission, salary and total salary of the salesperson.

Uploaded by

aimy rizwan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
0% found this document useful (0 votes)
44 views5 pages

SUBMITTED TO: Ma'am Misbah SUBMITTED BY: Aiman Rizwan ROLL NO: Info-Tech 16010 Department: Bs It Semeter: 6

The document is a C# program that calculates sales commission for a salesperson. It takes in the salesperson's name and monthly sales amount as input. It then determines the commission rate based on the sales amount and calculates the commission. It also takes the salary as input and calculates the total salary by adding the commission and salary. The program outputs the name, commission, salary and total salary of the salesperson.

Uploaded by

aimy rizwan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
You are on page 1/ 5

SUBMITTED TO: Ma’am Misbah

SUBMITTED BY: Aiman Rizwan


ROLL NO: info-tech 16010
DEPARTMENT: BS IT
SEMETER: 6
PROGRAM:1

class Program
{
static void Main(string[] args)
{
double sales,s,total, rate ,commission;
string i;

Console.Write("\n\t\t*** Calculating SalePerson Commission ***\n\n");

Console.Write(" \n Enter Name of SalePerson:");


i = (Console.ReadLine());

Console.Write(" \n Enter the amount of monthly sales:");


sales =Convert.ToDouble (Console.ReadLine());

if (sales <= 5000)


{
rate = 0;
commission = rate * sales;
Console.WriteLine("\n \t Sorry No Commission! \n \t %% BETTER LUCK NEXT TIME
%% !!! ");
Console.WriteLine("\n Commission is :{0}", commission);
}

else if (sales <= 10000)


{
rate = 5 / 100d;
commission = rate * sales;
Console.WriteLine(" \n Commission is Calculated at the rate is 5% \n So commission
will be:{0}", commission);
}
else if (sales <= 15000)
{
rate = 10 / 100d;
commission = rate * sales;
Console.WriteLine(" \n Commission is Calculated at the rate is 10% \n So commission
will be:{0}", commission);
}
else if (sales <= 20000)
{
rate = 15 / 100d;
commission = rate * sales;
Console.WriteLine(" \n Commission is Calculated at the rate is 15% \n So
commission will be:{0}", commission);
}

else if (sales <= 25000)


{
rate = 20 / 100d;
commission = rate * sales;
Console.WriteLine(" \n Commission is Calculated at the rate is 20% \n So
commission will be:{0}", commission);
}
else
{
rate = 25 / 100d;
commission = rate * sales;
Console.WriteLine(" \n Commission is Calculated at the rate is 25% \n So
commission will be:{0}", commission);
}
Console.Write("\n Enter the Salary:");
s = Convert.ToDouble(Console.ReadLine());
Console.Write("\n---------------------------------------------------------------\n");
Console.Write("\n\t\t\t *** TOTAL SALARY *** ");
total = commission + s;
Console.WriteLine("\n\t\t NAME:"+ i);
Console.WriteLine("\t\t COMMISSION:{0}", commission);
Console.WriteLine("\t\t SALARY:"+ s);
Console.WriteLine("\t\t TOTAL=SALARY+COMMISSION");
Console.WriteLine("\t\t TOTAL="+ total);
Console.Write("\n---------------------------------------------------------------\n");
Console.ReadKey();
}}}
RESULT:

You might also like