1 for Sunday, 2 for Monday using C program

#include<stdio.h>
#include<conio.h>
main()
{
int ch;

printf("Input any number from 1 to 7=");
scanf("%d",&ch);

switch(ch)
{
case 1:printf("Today is Sunday");
break;
case 2:printf("Today is Monday");
break;
case 3:printf("Today is Tuesday");
break;
case 4:printf("Today is Wednesday");
break;
case 5:
printf("Today is Thursday");
break;
case 6:printf("Today is Friday");
break;
case 7:printf("Today is Saturday");
break;
default:
printf("invalid input");
}
getch();
}

Leave a Reply

Your email address will not be published. Required fields are marked *

Enter Captcha Here : *

Reload Image