Advertisement
H34VENT

do while password

Nov 11th, 2019
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.41 KB | None | 0 0
  1. #include <iostream>
  2. #include <stdlib.h>
  3. using namespace std;
  4.  
  5. main (){
  6.     int percobaan=0;
  7.     string password;
  8.     do{
  9.         cout << "Masukkan Password anda : "; cin >> password;
  10.         percobaan = percobaan + 1;
  11.         if (percobaan==5){
  12.             cout << "Anda telah mencapai limit, program berhenti";
  13.             exit(EXIT_FAILURE);
  14.         }
  15.     }while (password != "ridho");
  16.         cout << "=======Selamat datang bos !=======";
  17.         return 0;
  18.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement