class Lat3{
public static void main(String Arg[]) throws IOException{
String str;
String nm;
int ttlhrg;
int hrg;
int kde;
int jlh;
BufferedReader Get=new BufferedReader(new
InputStreamReader(System.in));
System.out.print(" Kode : "); str=Get.readLine();
kde = Integer.parseInt(str);
switch(kde){
case 1 : nm= "Televisi" ; hrg= 1750000;
break;
case 2 : nm= "DVD" ; hrg= 750000;
break;
case 3 : nm= "CD Rom" ; hrg= 450000;
break;
default:
nm= ""; hrg= 0 ;
}
System.out.println(" Nama : " + nm);
System.out.println(" Harga : " + hrg);
System.out.print(" Jumlah : "); str=Get.readLine();
jlh = int.parslnt (string);
ttlhrg = jlh * hrg ;
System.out.println(" Total Harga : " + ttlhrg);
}
}
Tugas Ke 3 Program Java.
19.24
Hendra
Posted in
Langganan:
Posting Komentar (Atom)
No Response to "Tugas Ke 3 Program Java."
Posting Komentar