1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
#include <iostream>
#include <windows.h>
#include <string>
using namespace std;
int main ()
{
string mystr;
int a;
cout << "Welcome Competitor!\n\a";
Sleep (3000);
cout << "Your name:" ;
getline (cin, mystr);
Sleep (2000);
cout << "Name confirmed. \n\a" ;
cout << "Hello "; cout << mystr; cout << " and welcome.\a\n" ;
Sleep (5000);
cout << "Your age:" ;
cin >> a ;
cout << "Age confirmed\n\a";
cout << "Your are "; cout << a ; cout << "\n\n\a";
Sleep (5000) ;
if (a ==1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39 );
{
cout << "You are "; cout << a ; cout << ", so your age is an-odd number" ;
Sleep (8000);
}
else if (a =="");
{
cout << "Well its seems you have no age, that's a big shame" ;
Sleep (5000);
}
else if (a == 2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40);
{
cout << "You are " cout << a ; cout << ", so you are still ";
cout << "younger than me" ;
Sleep (10000) ;
}
else
{
cout << "" ;
Sleep (6000);
}
return 0;
}
|