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
62 lines (49 loc) · 1.47 KB
/
IndexPoint.java
File metadata and controls
62 lines (49 loc) · 1.47 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
61
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
//Rinaldy Achmad Fauzy
//1301154357
//IF 39-07
package indexpoint;
import java.util.Scanner;
/**
*
* @author Rinaldy A
*/
public class IndexPoint {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
double p,mid,end,quiz,finals;
// int r=0;
// p = cin.nextInt();
Scanner cin=new Scanner(System.in);
// for (r=1; r<=p; r++ ){}
System.out.println("Masukkan Nilai UTS: ");
mid=cin.nextDouble();
System.out.println("Masukkan Nilai UAS: ");
end=cin.nextDouble();
System.out.println("Masukkan Nilai Quiz: ");
quiz=cin.nextDouble();
finals= (0.35*mid)+(0.4*end)+(0.25*quiz);
if (finals>=85 && finals<=100){
System.out.println("Excellent");
}
else if (finals>=75 && finals<=84){
System.out.println("Very Good");
}
else if (finals>=65 && finals<=74){
System.out.println("Good");
}
else if (finals>=50 && finals<=64){
System.out.println("Accepted");
}
else if (finals>=0 && finals<=49){
System.out.println("Failed");
}
}
}