Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int a, points=0, c = 0;
- cout << "Please enter the amount the customer spent" << endl;
- cin >> a;
- while (c==0) {
- if (a <= 200)
- {
- cout << "Do you want to continue the program?." << endl;
- cout << "Enter 0 to continue enter 1 to end this program." << endl;
- cin >> c;
- points++;
- }
- cout << "Total number of purchases between $1 and $200 is" <<points<< endl;
- }
- while (c==0) {
- if (a <= 800)
- {
- cout << "Do you want to continue the program?." << endl;
- cout << "Enter 0 to continue enter 1 to end this program." << endl;
- cin >> c;
- points++;
- }
- cout << "Total number of purchases between $1 and $200 is" << points << endl;
- }
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement