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
35 lines (33 loc) · 1.01 KB
/
IndexPoint.java
File metadata and controls
35 lines (33 loc) · 1.01 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
package task_1;
import java.util.Scanner;
/**
*
* @author Andre Anugrah
*/
public class IndexPoint
{
public static void main(String[] args)
{
//input
Scanner input = new Scanner (System.in);
System.out.print("Nilai uas : ");
int uts = input.nextInt();
System.out.print("Nilai uts : ");
int uas = input.nextInt();
System.out.print("Nilai quis : ");
int quiz = input.nextInt();
//program
double nilai = (uts*0.35)+(uas*0.4)+(quiz*0.25);
//output
if (nilai >= 0 && nilai < 50)
System.out.println(nilai + ", Grade : Failed");
else if (nilai < 65)
System.out.println(nilai + ", Grade : Accepted");
else if (nilai < 75)
System.out.println(nilai + ", Grade : Good");
else if (nilai < 85)
System.out.println(nilai + ", Grade : Very Good");
else if (nilai <= 100)
System.out.println(nilai + ", Grade : Exellent");
}
}