Rainrix2001

Prob2

Aug 22nd, 2019
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.78 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main(){
  5.     string pin, rpin;
  6.     system("clear");
  7.     cout << "Automated Teller Machine \n\n";
  8.     cout << "--------------------------- \n";
  9.     cout << "Enter PIN: ";
  10.     cin >> pin;
  11.  
  12.     if (pin == "1234") {
  13.         cout << "--------------------------- \n";
  14.         cout << "Processing the transaction! \n";
  15.         cout << "--------------------------- \n\n";
  16.  
  17.     } else if (pin != "1234") {
  18.         cout << "Re-Enter PIN: ";
  19.         cin >> rpin;
  20.  
  21.     if (rpin == "1234") {
  22.         cout << "--------------------------- \n";
  23.         cout << "Processing the transaction! \n";
  24.         cout << "--------------------------- \n\n";
  25.  
  26.     } else {
  27.         cout << "--------------------------- \n";
  28.         cout << "Sorry ... Invalid PIN! \n";
  29.         cout << "--------------------------- \n\n";
  30.     }
  31.     }
  32.     return 0;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment