-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUserInput.java
More file actions
47 lines (41 loc) · 1.34 KB
/
Copy pathUserInput.java
File metadata and controls
47 lines (41 loc) · 1.34 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
import java.util.Scanner;
public class UserInput {
public static void main(String[] args) {
Scanner inputKeyboard = new Scanner(System.in);
//
// System.out.print("masukkan nama: ");
// // String
// String nama = inputKeyboard.nextLine();
//
// System.out.print("masukkan umur kamu: ");
// // int
// int umur = inputKeyboard.nextInt();
//
// System.out.print("masukkan tinggi bada kamu");
// // double
// double tinggi = inputKeyboard.nextDouble();
//
// System.out.println("wello apa kabar " + nama + " kamu berumur " + umur + " tahun");
// System.out.println("tinggi kamu adalah: " + tinggi + " cm");
// System.out.print("masukkan nilai panjang: ");
// short panjang = inputKeyboard.nextShort();
//
// System.out.print("masukkan nilai lebar: ");
// short lebar = inputKeyboard.nextShort();
//
// int hasil = panjang * lebar;
//
// System.out.println("hasilnya adalah: " + hasil);
// System.out.print("masukkan nilai koma: ");
// double nilaiKoma = inputKeyboard.nextDouble();
//
// double hasil = nilaiKoma * 33.21;
//
// System.out.println("hasilnya dikaliin dengan 33.21 adalah: " + hasil);
// long
// nextLong();
//
System.out.print("masukkan jumlah: ");
int umur = inputKeyboard.nextInt();
}
}