0% found this document useful (0 votes)
7 views4 pages

Sales Commission Calculator in Java

Uploaded by

wanthkyesh
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views4 pages

Sales Commission Calculator in Java

Uploaded by

wanthkyesh
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

import [Link].

*;

class Commision

public static void main()

Scanner Sc = new Scanner([Link]);

int i,j,S[] = new int [5],cost,com = 0;;

String s = "";

for(i = 1; i <= 3;i++)

[Link]("Enter cost of product sold - salesman " +i);

cost = [Link]();

[Link]("Enter number of sales in 5 cities:");

int total = 0;

for(j = 0; j < 5;j++)

S[j] = [Link]();

total += S[j];

if(total < 50)

com = 0;

else if(total >= 50 && total < 500)

{
com = (total * cost * 5)/100;

else if(total >= 500 && total < 750)

com = (total * cost * 10)/100;

else if(total >= 750 && total < 900)

com = (total * cost * 15)/100;

else if(total >= 900)

com = (total * cost * 20)/100;

s = s +"Salesman "+i+":\nCommision = "+com+"\n";

[Link](s);

Enter cost of product sold - salesman 1

200

Enter number of sales in 5 cities:

70

30

80
70

50

Enter cost of product sold - salesman 2

500

Enter number of sales in 5 cities:

40

60

90

60

50

Enter cost of product sold - salesman 3

300

Enter number of sales in 5 cities:

80

90

40

60

30

Salesman 1:

Commision = 3000

Salesman 2:

Commision = 7500

Salesman 3:
Commision = 4500

You might also like