//Day
in a week
#include<iostream.h>
#include<conio.h>
void
main()
{
int
n;
clrscr();
cout<<"enter
a number:";
cin>>n;
switch(n)
{
case
1:cout<<"Sunday";break;
case
2:cout<<"Monday";break;
case
3:cout<<"Tuesday";break;
case
4:cout<<"Wednesday";break;
case
5:cout<<"Thursday";break;
case
6:cout<<"Friday";break;
case
7:cout<<"Saturday";break;
default:cout<<"invalid
input";
}
getch();
}
No comments:
Post a Comment