-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSiakad04.java
43 lines (33 loc) · 1.27 KB
/
Siakad04.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
41
42
43
import java.util.Scanner;
/**
* Siakad04
*/
public class Siakad04 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String nama,nim;
char kelas;
byte absen;
double nilaiKuis, nilaiTugas, nilaiUjian, nilaiUas, nilaiAkhir;
System.out.println("Masukkan nama: ");
nama = sc.nextLine();
System.out.println("Masukkan NIM: ");
nim = sc.nextLine();
System.out.println("Masukkan kelas: ");
kelas = sc.nextLine().charAt(0);
System.out.println("Masukkan nomer absen: ");
absen = sc.nextByte();
System.out.println("Masukkan nilai kuis: ");
nilaiKuis = sc.nextDouble();
System.out.println("Masukkan nilai tugas: ");
nilaiTugas = sc.nextDouble();
System.out.println("Masukkan nilai ujian: ");
nilaiUjian = sc.nextDouble();
System.out.println("Masukkan nilai uas");
nilaiUas = sc.nextDouble();
nilaiAkhir = (nilaiKuis + nilaiTugas + nilaiUjian + nilaiUas) / 3;
System.out.println("Nama: " + nama + " NIM: " + nim);
System.out.println("Kelas: " + kelas + "absen: " + absen);
System.out.println("Nilai Akhir: " + nilaiAkhir);
}
}