Guest User

Untitled

a guest
Apr 21st, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.71 KB | None | 0 0
  1.     int Response; // What the user will input to decide which account he wants to withdraw
  2.     double Checkings; // The Checkings needs to be an array
  3.     double Savings; // the Savings needs to be an array
  4.    
  5.     cout << "Which account would you like to check balance of?"<<endl;
  6.     cout << "(1) checking"<<endl;
  7.     cout << "(2) savings"<<endl;
  8.     cin >> Response;
  9.     system("cls");//system("clear"); in unix
  10.     Checkings =7;
  11.     Savings =5;
  12.     while (Response <1 || Response >2)
  13.     {
  14.         cout << "Which account would you like to check balance of? 1 for checking and 2 for savings" << endl;
  15.         cin >> Response;
  16.     }
  17.    
  18.     if (Response == 1)
  19.     {
  20.         cout << Checkings << endl;
  21.     }
  22.  
  23.     if (Response == 2)
  24.     {  
  25.         cout << Savings << endl;
  26.     }
Add Comment
Please, Sign In to add comment