Filename | Show the months |
Permission | rw-r--r-- |
Author | pramana |
Date and Time | 3:07 am |
Label | Alpro cases |
Action |
This time i will share a program where this program will show months when you input a number...
This algorithm of Show the months program
1. Input numbers
2. process ( this process used the selection )
3. Show the months
Look the source code of Show the months program
#include <cstdlib>
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
int s;
il : system("exit");
cout<<"Enter number : ";
cin>>s;
if(s==1){cout<<"January"<<endl;
}
else if (s==2){cout<<"February"<<endl;}
else if (s==3){cout<<"March"<<endl;}
else if (s==4){cout<<"April"<<endl;}
else if (s==5){cout<<"may"<<endl;}
else if (s==6){cout<<"june"<<endl;}
else if (s==7){cout<<"july"<<endl;}
else if (s==8){cout<<"august"<<endl;}
else if (s==9){cout<<"september"<<endl;}
else if (s==10){cout<<"october"<<endl;}
else if (s==11){cout<<"november"<<endl;}
else if (s==12){cout<<"december"<<endl;}
else {cout<<"NO month on your number"<<endl;}
cout<<endl<<"exit = Ctrl+c "<<endl<<endl;
goto il;
system("PAUSE");
return EXIT_SUCCESS;
}
SAFE LEARN GUYS :)
I HOPE THIS CAN HELP YOU !
0 comments:
Post a Comment