Advertisement
Guest User

Untitled

a guest
Feb 25th, 2020
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.90 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5.     int a, points=0, c = 0;
  6.     cout << "Please enter the amount the customer spent" << endl;
  7.     cin >> a;
  8.     while (c==0) {
  9.         if (a <= 200)
  10.         {
  11.             cout << "Do you want to continue the program?." << endl;
  12.             cout << "Enter 0 to continue enter 1 to end this program." << endl;
  13.             cin >> c;
  14.             points++;
  15.         }
  16.         cout << "Total number of purchases between $1 and $200 is" <<points<< endl;
  17.     }
  18.     while (c==0) {
  19.         if (a <= 800)
  20.         {
  21.             cout << "Do you want to continue the program?." << endl;
  22.             cout << "Enter 0 to continue enter 1 to end this program." << endl;
  23.             cin >> c;
  24.             points++;
  25.         }
  26.         cout << "Total number of purchases between $1 and $200 is" << points << endl;
  27.     }
  28.     system("pause");
  29.     return 0;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement