berikut source code programnya
import java.util.Scanner;
class menu {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int pil;
System.out.println("\t.:Menu:\n\n");
System.out.println("\t1.Menu Satu");
System.out.println("\t2.Menu Dua");
System.out.println("\t3.MenuTiga\n");
do{
System.out.print("\t=>Masukkan Pilihan Anda (1-3)= ");
pil = input.nextInt();
switch(pil){
case 1:
do{
System.out.print("/n/n/n/nMenu Satu");
}while()
case 2:
System.out.println("/n/n/n/nMenu Dua");
break;
case 3:
System.out.println("n/n/n/n/nMenu Tiga");
break;
default:
System.out.print("\t::Pilihan Anda Salah Menu Hanya Ada 3 \n\n");
break;
}
}while(pil<1||pil>3);
}
}
0 komentar:
Posting Komentar