This Program Is Helps To Print Day Of Week Using Switch Case In C++ Language
_____________________________________
#include<iostream.h>
#include<conio.h>
void main()
{
int week;
clrscr();
/* Input week number from user */
cout<<"Enter week number(1-7): ";
cin>>week;
switch(week)
{
case 1:
cout<<"Monday";
break;
case 2:
cout<<"Tuesday";
break;
case 3:
cout<<"Wednesday";
break;
case 4:
cout<<"Thursday";
break;
case 5:
cout<<"Friday";
break;
case 6:
cout<<"Saturday";
break;
case 7:
cout<<"Sunday";
break;
default:
cout<<"Invalid input! Please enter week number between 1-7.";
}
getch();
}
_____________________________________
Run This Program Using Turbo C++ in Pc Or TurboCdroid in Android It Will Work
#DigitaliseData#C++Programing
0 Comments