Write a program that inputs number of week’s day and displays the name of the day. For example if user enters 1,it display “Friday” and so on.

Write a program that inputs number of week’s day and displays the name of the day. For example if user enters 1,it display “Friday” and so on.



#include<iostream>
using namespace std;
int main()
{
int w;
cout<<"\t Name of the Day "<<endl;
cout<<"\n";
cout<<"Enter the Number of the Week's day"<<endl;
cin>>w;
switch(w)
{
case 1:
{
cout<<"The Day is Monday"<<endl;
break;
}
case 2:
{
cout<<"The Day is Tuesday"<<endl;
break;
}
case 3:
{
cout<<"The Day is Wednesday"<<endl;
break;
}
case 4:
{
cout<<"The Day is Thursday"<<endl;
break;
}
case 5:
{
cout<<"The Day is Friday"<<endl;
break;
}
case 6:
{
cout<<"The Day is Saturday"<<endl;
break;
}
case 7:
{
cout<<"The Day is Sunday"<<endl;
break;
}
default:
{
cout<<"Invalid Number. Please enter a valid number (From 1-7)";
}
}
}


Write a program that inputs number of week’s day and displays the name of the day. For example if user enters 1,it display “Friday” and so on.