forked from OOP-ADF/Task_1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
IndexPoint.java
37 lines (31 loc) · 906 Bytes
/
IndexPoint.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
37
import java.util.Scanner;
public class IndexPoint {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
int uts,uas,kuis;
double scr;
Scanner scan = new Scanner(System.in);
System.out.println("Masukkan Nilai: ");
uts = scan.nextInt();
uas = scan.nextInt();
kuis = scan.nextInt();
scr = (uts*0.35) + (uas*0.4) + (kuis*0.25);
if(scr<=100 && scr>84){
System.out.println("Excellent");
}
else if(scr<=84 && scr>74){
System.out.println("Very Good");
}
else if(scr<=74 && scr>64){
System.out.println("Good");
}
else if (scr<=64 && scr>49){
System.out.println("Accepted");
}
else {
System.out.println("Failed");
}
}
}