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
49 lines (42 loc) · 1.38 KB
/
IndexPoint.java
File metadata and controls
49 lines (42 loc) · 1.38 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
/*
* 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.
*/
package indeksnilai;
import java.util.Scanner;
/**
*
* @author 1301154404_Muhammad Rifky Putra Ananda_IF39-12
*/
public class IndeksNilai {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
Scanner cin = new Scanner (System.in);
System.out.print("Masukkan nilai UTS = ");
int uts = cin.nextInt();
System.out.print("Masukkan nilai UAS = ");
int uas = cin.nextInt();
System.out.print("Masukkan nilai Quiz = ");
int quiz = cin.nextInt();
double nilai = (0.35*uts)+(0.4*uas)+(0.25*quiz);
if ((nilai >= 85) & (nilai <= 100)) {
System.out.println("Excellent");
}
else if ((nilai >= 75) & (nilai <= 84)) {
System.out.println("Very Good");
}
else if ((nilai >= 65) & (nilai <= 74)) {
System.out.println("Good");
}
else if ((nilai >= 50) & (nilai <= 64)) {
System.out.println("Accepted");
}
else {
System.out.println("Failed");
}
}
}