128: Write a program that input your ATM password from the user and check if entered password is valid or not. If password is valid, display the messege: "Welcome to the Bank". Otherwise program ask to re-enter password 3 times If user enters the correct password, say: "Welcome to the bank". Otherwise display the messege: "Sorry your card is Captured".
With while loop: // Write a program that input your ATM password from the user and check // if entered password is valid or not. // If password is valid, display the messege: "Welcome to the Bank". // Otherwise program ask to re-enter password 3 times // If user enters the correct password, say: "Welcome to the bank". // Otherwise display the messege: "Sorry your card is Captured". #include < iostream > using namespace std ; int main () { int pin = 1234 ; int password ; cout << " Enter your password: " ; cin >> password ; int i = 1 ; while ( password != pin && i < 3 ) { cout << " Invalid Input \n" ; cout << " Re-enter your password: " ; cin >> password ; i ++ ; } if ( password == pin ) ...