//Write a program to enter 1 to 7 case and display day of week. #include<stdio.h> #include<conio.h> void main() { int day; clrscr(); printf("Enter number between 1 to 7"); scanf("%d",&day); switch(day) { 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("Invalid input"); } getch(); }
Comments
Post a Comment