forked from OOP-ADF/Task_1
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIndexPoint.java
More file actions
32 lines (29 loc) · 1.05 KB
/
IndexPoint.java
File metadata and controls
32 lines (29 loc) · 1.05 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
import java.util.Scanner;
public class IndexPoint {
public static void main(String[] args) {
System.out.println("NILAI");
Scanner cin = new Scanner(System.in);
System.out.print("Nilai Kuis: ");
int kuis = cin.nextInt();
System.out.print("Nilai UTS: ");
int uts = cin.nextInt();
System.out.print("Nilai UAS: ");
int uas = cin.nextInt();
double finalscore = ((kuis*0.25) + (uts*0.35) + (uas*0.4));
if (finalscore >= 85 && finalscore <= 100) {
System.out.println("Grade : Excellent");
}
else if (finalscore >= 75 && finalscore <= 85) {
System.out.println("grade : Very Good");
}
else if (finalscore >=65 && finalscore <=74 ) {
System.out.println("Grade : Good");
}
else if (finalscore >=50 && finalscore <= 64) {
System.out.println("Grade: Accepted");
}
else if (finalscore >= 49 && finalscore <=0) {
System.out.println("Grade : Failed");
}
}
}