Repository navigation
Expand file tree
/
Copy pathTaskTwentynine.java
More file actions
60 lines (45 loc) · 1.65 KB
/
Copy pathTaskTwentynine.java
File metadata and controls
60 lines (45 loc) · 1.65 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import java.util.Scanner;
<<<<<<< HEAD
=======
>>>>>>> 23f4b40 (Initial commit)
public class TaskTwentynine{
public static void main(String[] agrs){
Scanner userInput = new Scanner(System.in);
<<<<<<< HEAD
System.out.print("Enter hourly wage rate: ");
int hourlyWage = userInput.nextInt();
System.out.print("Enter number hours worked: ");
int hoursWorked = userInput.nextInt();
int nomalRate = hourlyWage * hoursWorked;
double overTime = hourlyWage * hoursWorked * 1.5;
if (hourlyWage <= 40)
System.out.print("Total earning " + nomalRate + "\n");
else
System.out.print("Total earning for overtime " + overTime + "\n");
}
=======
System.out.print("Enter score (0 - 100): ");
int scoreInput = userInput.nextInt();
String gradeA = "A (90-100)";
String gradeB = "B (80-89)";
String gradeC = "C (70-79)";
String gradeD = "D (60-69)" ;
String gradeF = "F (below 60)";
if (scoreInput >= 90){
System.out.print(gradeA + "\n");
}
else if (scoreInput >= 80){
System.out.print(gradeB + "\n");
}
else if (scoreInput >= 70){
System.out.print(gradeC + "\n");
}
else if (scoreInput >= 60){
System.out.print(gradeD + "\n");
}
else if (scoreInput < 60){
System.out.print(gradeF + "\n");
}
}
>>>>>>> 23f4b40 (Initial commit)
}