#include<iostream.h>
#include<conio.h>
void main()
{
int day;
clrscr();
cout<<"Enter number of week's day 1 - 7 ";
cin>>day;
switch(day)
{
case1:cout<<"sunday";break;
case2:cout<<"monday";break;
case3:cout<<"tuesday";break;
case4:cout<<"wednesday";break;
case5:cout<<"thursday";break;
case6:cout<<"friday";break;
case7:cout<<"saturday";break;
default:cout<<"invalid day number";
}
getch();
}
#include<conio.h>
void main()
{
int day;
clrscr();
cout<<"Enter number of week's day 1 - 7 ";
cin>>day;
switch(day)
{
case1:cout<<"sunday";break;
case2:cout<<"monday";break;
case3:cout<<"tuesday";break;
case4:cout<<"wednesday";break;
case5:cout<<"thursday";break;
case6:cout<<"friday";break;
case7:cout<<"saturday";break;
default:cout<<"invalid day number";
}
getch();
}
No comments:
Post a Comment