double price, summ;
cout << "Enter price(UAH):";
cin >> price;
cout << "Enter summ(UAH):";
cin >> summ;
int tmp = summ / price;
cout << "you can buy " << tmp << " units sold" << endl;
cout << "And you have " << summ - tmp*price << " UAH" << endl;
system("pause");
cout << "Enter price(UAH):";
cin >> price;
cout << "Enter summ(UAH):";
cin >> summ;
int tmp = summ / price;
cout << "you can buy " << tmp << " units sold" << endl;
cout << "And you have " << summ - tmp*price << " UAH" << endl;
system("pause");
Комментариев нет:
Отправить комментарий