Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //17
- int amount, price, total;
- bool done;
- while (!done)
- {
- total = 0;
- cout << "Enter amount of products" << endl;
- cin >> amount;
- cout << endl;
- for (int i = 0; i < amount; i++)
- {
- cout << "Enter the price of product " << i + 1 << endl;
- cin >> price;
- cout << endl;
- total += price;
- }
- if (total < 200)
- total = total + 10(amount);
- cout << "you must pay " << total << "$" << endl;
- cout << "enter 1 if done, 0 otherwise" << endl;
- cin >> done;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement