Advertisement
ivanwidyan

Password System With Two Numbers

Oct 16th, 2016
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.29 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.     int password;
  6.  
  7.     cout << "Enter your password (numbers): ";
  8.     cin >> password;
  9.  
  10.     if (password == 1234 || password == 2345) {
  11.         cout << "Access Granted!" << endl;
  12.     }
  13.     else {
  14.         cout << "Access Denied!" << endl;
  15.         return 0;
  16.     }  
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement