Advertisement
Guest User

Untitled

a guest
Aug 15th, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.68 KB | None | 0 0
  1.  
  2. #include <iostream>
  3. using namespace std;
  4. main()
  5. {
  6.       string username;
  7.       string password;
  8.       string userpass = "stockholm";
  9.       string username2 = "oskar";
  10.       cout << " Hello and welcome to my site" << endl << endl;
  11.       cout << " Please enter your username and password" << endl << endl;
  12.       cin >> username;
  13.       cout << endl << endl;
  14.       cin >> password;
  15.       if (username == username2 || password = userpass)
  16.      
  17.       {
  18.       cout << " You have login ";
  19.        }
  20.        else
  21.        {
  22.            cout << " You have entered a invalid password or username, try again"
  23.            }
  24.            
  25.            system("pause");
  26.            return 0;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement