/*WAP to display day name according to enter number*/
#include<stdio.h> #include<conio.h> void main() { int day; clrscr(); printf("enter no."); scanf("\n%d",&day); switch(day) { case 1:printf("monday"); break; case 2:printf("tuesday"); break; case 3:printf("wednesday"); break; case 4:printf("thusday"); break; case 5:printf("friday"); break; case 6:printf("satarday"); break; case 7:printf("sunday"); break; default:printf("No Day"); } getch(); }
No comments:
Post a Comment