-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSiakad05.java
40 lines (33 loc) · 1.23 KB
/
Siakad05.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
38
39
40
import java.util.Scanner;
/**
* Siakad05
*/
public class Siakad05 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String nama, nim;
String kelas;
byte absen;
double nilaiKuis, nilaiTugas, nilaiUTS, nilaiUAS, nilaiAkhir;
System.out.print("Masukkan nama: ");
nama = sc.nextLine();
System.out.print("Masukkan NIM: ");
nim = sc.nextLine();
System.out.print("Masukkan kelas: ");
kelas = sc.nextLine();
System.out.print("Masukkan nomor absen: ");
absen = sc.nextByte();
System.out.print("Masukkan nilai kuis: ");
nilaiKuis = sc.nextDouble();
System.out.print("Masukkan nilai tugas: ");
nilaiTugas = sc.nextDouble();
System.out.print("Masukkan nilai UTS: ");
nilaiUTS = sc.nextDouble();
System.out.print("Masukkan nilai UAS: ");
nilaiUAS = sc.nextDouble();
nilaiAkhir = (0.2 * nilaiKuis + 0.15 * nilaiTugas + 0.3 * nilaiUTS + 0.35 * nilaiUAS);
System.out.println("Nama: " + nama + " NIM: " + nim);
System.out.println("Kelas: " + kelas + " Absen: " + absen);
System.out.println("Nilai Akhir: " + nilaiAkhir);
}
}