-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCommission.java
More file actions
31 lines (28 loc) · 859 Bytes
/
Commission.java
File metadata and controls
31 lines (28 loc) · 859 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/**
*
* @author Mudassar
*/
import java.util.Scanner;
public class Commission {
public static void main(String[] args) {
int salary;
Scanner sc=new Scanner(System.in);
System.out.println("Enter salary:");
salary=sc.nextInt();
if(salary<=20000)
{
System.out.println("Rate of commission:3%");
System.out.println("sales with commission:"+(salary+(salary*3)/100));
}
else if (salary>20000&&salary<=50000)
{
System.out.println("Rate of commission:15%");
System.out.println("sales with commission:"+(salary+(salary*15)/100));
}
else if(salary>=50001)
{
System.out.println("Rate of commission:31%");
System.out.println("sales with commission:"+(salary+(salary*31)/100));
}
}
}