#include<iostream.h>
#include<conio.h>
void main(){
int day;
clrscr();
cout<<"Enter Day b\w 1 to7="<<endl;
cin>>day;
switch(day){
case 1:cout<<"Monday"<<endl;break;
case 2:cout<<"Tuesday"<<endl;break;
case 3:cout<<"Wednesday"<<endl;break;
case 4:cout<<"Thursday"<<endl;break;
case 5:cout<<"Friday"<<endl;break;
case 6:cout<<"Saturday"<<endl;break;
case 7:cout<<"Sunday"<<endl;break;
default:cout<<"Wrong Month"<<endl;
}
getch();
}
#include<conio.h>
void main(){
int day;
clrscr();
cout<<"Enter Day b\w 1 to7="<<endl;
cin>>day;
switch(day){
case 1:cout<<"Monday"<<endl;break;
case 2:cout<<"Tuesday"<<endl;break;
case 3:cout<<"Wednesday"<<endl;break;
case 4:cout<<"Thursday"<<endl;break;
case 5:cout<<"Friday"<<endl;break;
case 6:cout<<"Saturday"<<endl;break;
case 7:cout<<"Sunday"<<endl;break;
default:cout<<"Wrong Month"<<endl;
}
getch();
}
No comments:
Post a Comment