-
Notifications
You must be signed in to change notification settings - Fork 0
/
Sungoku.java
55 lines (33 loc) · 1.51 KB
/
Sungoku.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
44
45
46
47
48
49
50
51
52
53
54
55
import java.util.Scanner;
public class Sungoku{
public static void main(String[] args) {
String nama,alamat,hobi,perkerjaan,univesitas,warna;
int umur,nomorinduk;
long nokartu;
Scanner loli = new Scanner (System.in) ;
System.out.print("Masukan nama = ");
nama = loli.nextLine();
System.out.print("Masukan alamat = ");
alamat = loli.nextLine();
System.out.print("Masukan universitas = ");
univesitas = loli.nextLine();
System.out.print("Masukan umur = ");
umur = loli.nextInt();
System.out.print("Masukan noInduk = ");
nomorinduk = loli.nextInt();
System.out.print("Masukan noKartu = ");
nokartu = loli.nextLong();
warna = umur %2==0 ?"hitam" : "biru" ;
perkerjaan = nomorinduk %2==0 ? "Sales" : "Servis" ;
System.out.println("============DATA DIRI============");
System.out.println("=================================");
System.out.println("Nama Anda = " +nama);
System.out.println("Alamat Anda = " + alamat);
System.out.println("Umur Anda = " + umur+ "Tahun");
System.out.println("Universitas = " + univesitas);
System.out.println("Nomor Induk = " +nomorinduk);
System.out.println("NomorKartu = " + nokartu);
System.out.println("Warna Kesukaan = " + warna);
System.out.println("Perkerjaan = "+ perkerjaan);
}
}