Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main(){
- string pin, rpin;
- system("clear");
- cout << "Automated Teller Machine \n\n";
- cout << "--------------------------- \n";
- cout << "Enter PIN: ";
- cin >> pin;
- if (pin == "1234") {
- cout << "--------------------------- \n";
- cout << "Processing the transaction! \n";
- cout << "--------------------------- \n\n";
- } else if (pin != "1234") {
- cout << "Re-Enter PIN: ";
- cin >> rpin;
- if (rpin == "1234") {
- cout << "--------------------------- \n";
- cout << "Processing the transaction! \n";
- cout << "--------------------------- \n\n";
- } else {
- cout << "--------------------------- \n";
- cout << "Sorry ... Invalid PIN! \n";
- cout << "--------------------------- \n\n";
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment