@. PROGRAM PENAMPILAN HARI



public class Hari {
public static void main(String[] args) {
int hari=5;
switch(hari)
{
case 1:
System.out.println("ini dalah hari : Senin");
break;
case 2:
System.out.println("ini dalah hari : Selasa");
break;
case 3:
System.out.println("ini dalah hari : Rabu");
break;
case 4:
System.out.println("ini dalah hari : Kamis");
break;
case 5:
System.out.println("ini dalah hari : Jumat");
break;
case 6:
System.out.println("ini dalah hari : Sabtu");
break;
case 7:
System.out.println("ini dalah hari : Minggu");
break;
default:
System.out.println("Sorry, you failed.");
}
}
}


0 komentar:

Posting Komentar