-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEmployee.java
36 lines (25 loc) · 1000 Bytes
/
Employee.java
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
32
33
34
35
36
package com.jan31;
import java.util.Scanner;
public class Employee {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("Enter Name:");
String name = sc.nextLine();
System.out.println("Enter Salary/Day:");
int salPerDay = sc.nextInt();
System.out.println("Attendance in Days of that Month:");
int attendance = sc.nextInt();
int salary = salPerDay * attendance;
if (salary >= 10000) {
System.out.println("Hi " + name + ", your designation is Team Leader");
} else if (8000 <= salary && salary < 10000) {
System.out.println("Hi " + name + ", your designation is Senior Developer");
} else if (6000 <= salary && salary < 8000) {
System.out.println("Hi " + name + ", your designation is Junior Developer");
} else if (4000 <= salary && salary < 6000) {
System.out.println("Hi " + name + ", your designation is Trainee");
} else {
System.out.println("Hi " + name + ", your designation is Clerk");
}
}
}