double price, quantity, summ, sale;
cout << "Enter price:";
cin >> price;
cout << "Enter quantity:";
cin >> quantity;
summ = price*quantity;
if (summ < 100)
cout << "Enter price:";
cin >> price;
cout << "Enter quantity:";
cin >> quantity;
summ = price*quantity;
if (summ < 100)
cout << "Not sale" << endl;else if (summ >= 100 && summ < 200)
cout << "3% sale" << endl;else if (summ >= 200 && summ <= 300)
cout << "5% sale" << endl;else if (summ >= 300)
cout << "7% sale" << endl;system("pause");
Комментариев нет:
Отправить комментарий