- WAP to display the Name of days of Week.
#include <conio.h>
void main()
{
int ch;
printf("Enter the day number");
scanf("%d",&ch);
switch(ch)
{
case 1:
printf("Sunday");break;
case 2:
printf("Monday");break;
case 3:
printf("Tuesday");break;
case 4:
printf("Wednesday");break;
case 5:
printf("Thusday");break;
case 6:
printf("Friday");break;
case 7:
printf("Saturday");break;
default:
printf("Wrong Choice");
}
getch();
}
No comments:
Post a Comment