Program Switch-hari
#include <stdio.h>
main ()
{
int hari;
printf("Input Code Day (1-7) = ");
scanf("%d",&hari);
switch(hari)
{
case 1:printf("Monday");break;
case 2:printf("Tuesday");break;
case 3:printf("Wednesday");break;
case 4:printf("Thursday");break;
case 5:printf("Friday");break;
case 6:printf("Saturday");break;
case 7:printf("Sunday");break;
default:printf("Code is False");break;
}
}
0 koment:
Posting Komentar