package pertemuan5;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner Nilai=new Scanner (System.in);
System.out.print("input Nilai
x = ");
int x = Nilai.nextInt();
if (x==1) {
System.out.println("Nilai x =
" +x);
}else if (x==2) {
System.out.println("Nilai x =
" +x);
}else{
System.out.println("Nilai x =
" +x);
}
Scanner Jeniskelamin=new Scanner
(System.in);
System.out.print("input Jenis
kelamin = ");
String
jeniskelamin=Jeniskelamin.nextLine();
if (jeniskelamin.equals("L"))
{
System.out.println("laki-laki");
}else {
System.out.println("perempuan");
}
}
}
Dosen Pengampu : Fince
Tinus Waruwu M.Kom
Tidak ada komentar:
Posting Komentar