Thursday, 11 May 2017
C++ tutorials in Hindi/Urdu - Switch Statement [23]
#include<constream.h>
#include<iomanip.h>
void main(){
clrscr();
// switch
int num;
cout<<"Enter a number of weekday";
cin>>num;
switch(num)
{
case 1:
cout<<"friday";
break;
case 2:
cout<<"saturday";
break;
case 3:
cout<<"sunday";
break;
case 4:
cout<<"monday";
break;
case 5:
cout<<"tuesday";
break;
case 6:
cout<<"wed";
break;
case 7:
cout<<"thursday";
break;
default:
cout<<"invalid";
}
getch();
}
Labels:
C++,
c++ full course,
c++ projects,
c++ videos,
cplus,
hindi,
in Urdu
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment