double uah;
int answer;
const double eur = 28.05;
const double usd = 26.74;
const double rub = 0.33;
cout << "-------Menu-------" << endl;
cout << "1 - EUR" << endl;
cout << "2 - USD" << endl;
cout << "3 - RUB" << endl;
cout << "0 - Exit" << endl;
cin >> answer;
switch (answer)
{
case 1:
system("pause");
int answer;
const double eur = 28.05;
const double usd = 26.74;
const double rub = 0.33;
cout << "-------Menu-------" << endl;
cout << "1 - EUR" << endl;
cout << "2 - USD" << endl;
cout << "3 - RUB" << endl;
cout << "0 - Exit" << endl;
cin >> answer;
switch (answer)
{
case 1:
cout << "Enter UAH:";case 2:
cin >> uah;
cout << uah / eur << " EUR" << endl;
break;
cout << "Enter UAH:";case 3:
cin >> uah;
cout << uah / usd << " USD" << endl;
break;
cout << "Enter UAH:";case 0:
cin >> uah;
cout << uah / rub << " RUB" << endl;
break;
exit(0);default:
break;
cout << "Error!" << endl;}
break;
system("pause");
Комментариев нет:
Отправить комментарий