Advertisement
NoitsHarvey

Simple Login system

Sep 1st, 2017
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.48 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     string name;
  9.     string password;
  10.     cout << "username: "; cin >> name;
  11.     cout << "password: "; cin >> password;
  12.     if (name == "Harvey" || name == "harvey")
  13.     {
  14.         if (password == "pass")
  15.         {
  16.             cout << "Welcome back Harvey" << endl;
  17.         }
  18.         else {
  19.             cout << "password Incorrect. Access Denied" << endl;
  20.         }
  21.     }
  22.     else {
  23.         cout << "Username Incorrect. Access Denied" << endl;
  24.     }
  25.     system("pause");
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement