Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.69 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4. int main()
  5. {
  6.     string username;
  7.     string password;
  8.     bool success;
  9.     cout <<"\tKek\n";
  10.     do
  11.     {
  12.         cout << "\nUsername: ";
  13.         cin >> username;
  14.         cout << "Password: ";
  15.         cin >> password;
  16.         if (username == "Mr.Serhio" && password == "1234")
  17.     {
  18.         cout << "\nDarou, Serhio.";
  19.         success = true;
  20.        
  21.     }
  22.         else if (username == "Ms.Eva" && password == "1234")
  23.     {
  24.         cout << "\nDarou, Ms.Eva";
  25.         success = true;
  26.     }
  27.     else
  28.     {
  29.         cout << "\nYour login failed.";
  30.         success = false;
  31.     }
  32. } while (!success);
  33. return 0;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement