#include <stdio.h>
int main()
{
int kode;
printf("Menetukan hari.\n");
printf("input kode [1 - 7]: ");
scanf("%d", &kode);
switch (kode)
{
case 1:puts("hari minggu"); break;
case 2:puts("hari senin"); break;
case 3:puts("hari selasa"); break;
case 4:puts("hari rabu"); break;
case 5:puts("hari kamis"); break;
case 6:puts("hari jumat"); break;
case 7:puts("hari sabtu"); break;
default:puts("kode salah");
}
return 0;
}
0 comments
Post a Comment