-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIfStatement.java
More file actions
39 lines (34 loc) · 1.06 KB
/
Copy pathIfStatement.java
File metadata and controls
39 lines (34 loc) · 1.06 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
import java.util.Scanner;
public class IfStatement {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.print("masukkan umur kamu: ");
int umur = input.nextInt();
System.out.print("masukkan nilai kamu: ");
int nilai = input.nextInt();
//
// if (umur >= 18 && nilai >= 80) {
// System.out.println("sudah cukup usia dan lulus");
// } else if (umur >= 15 && nilai >= 70) {
// System.out.println("masih remaja dan lulus");
// } else if (umur >= 10 && nilai >= 60) {
// System.out.println("kamu bentar lagi mau remaja dan kamu lulus");
// } else {
// System.out.println("kamu masih bocil");
// }
// if (umur >= 18) {
// if (nilai >= 80) {
// System.out.println("lulus");
// } else {
// System.out.println("tidak lulus");
// }
// } else {
// if (nilai >= 80) {
// System.out.println("lulus tapi masih bocil");
// } else {
// System.out.println("keduanya tidak lulus");
// }
// }
input.close();
}
}