int age, answer;
const int men = 65;
const int woman = 60;
cout << "---Menu---" << endl;
cout << "1 - Men" << endl;
cout << "2 - Woman" << endl;
cin >> answer;
switch (answer)
{
case 1:
system("pause");
const int men = 65;
const int woman = 60;
cout << "---Menu---" << endl;
cout << "1 - Men" << endl;
cout << "2 - Woman" << endl;
cin >> answer;
switch (answer)
{
case 1:
cout << "Enter age:";case 2:
cin >> age;
cout << ((age > men) ? "It's time to retire" : "Early retirement") << endl;
break;
cout << "Enter age:";default:
cin >> age;
cout << ((age > woman) ? "It's time to retire" : "Early retirement") << endl;
break;
cout << "Error!" << endl;}
break;
system("pause");
Комментариев нет:
Отправить комментарий