-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIf Majemuk java
More file actions
33 lines (21 loc) · 1.05 KB
/
If Majemuk java
File metadata and controls
33 lines (21 loc) · 1.05 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
package com.program;
import java.util.Scanner;
public class cIFMajemuk {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.print("Siapa Nama Anda : ");
String nama = input.nextLine();
System.out.print("Jurusan Kuliah Apa : ");
String jurusan = input.nextLine();
// Soal atau Permasalahan
// 1. nama gak boleh kosong
// 2. pekerjaanya harus programmer / Desainer
if ( !nama.isEmpty() && jurusan.equalsIgnoreCase("Informatika")) {
System.out.println("Selamat ya " + nama + " , Anda Menantu Idaman Bangett");
}else if (!nama.isEmpty() && jurusan.equalsIgnoreCase("Kedokteran")) {
System.out.println("Hallo " + nama + " , Anda Adalah Menantu Yang Hebat");
}else {
System.out.println("Maaf " + nama +" Anda Tidak Cocok Dengan Anak Saya , Kasta Anda Terlalu Rendah ,Makanya Jadi Anak Informatika Dong Kayak Bayu Setia");
}
}
}