Advertisement
Guest User

Untitled

a guest
Oct 6th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.93 KB | None | 0 0
  1. #include <iostream>
  2. #include "conio.h"
  3. #include <string>
  4. using namespace std;
  5.  
  6. string UserName;
  7. string Password;
  8. string Auth;
  9. int PassWordJohn();
  10. int PassWordStatic();
  11. int IncorrectUserName();
  12. int StaticGotOwned();
  13.  
  14. void main(){
  15.     string UserName;
  16.     StartUN:;
  17.     cout << "UserName: ";
  18.     getline (cin, UserName);
  19.     cin.clear();
  20.     cout << endl;
  21.     if (UserName == "John") PassWordJohn();
  22.     if (UserName == "Static") PassWordStatic();
  23.         else system ("exit");
  24.     _getch();
  25. }
  26.  
  27. int PassWordJohn(){
  28.     string Auth;
  29.     string PassWord;
  30.     StartJPW:;
  31.     cout << "Password: ";
  32.     getline (cin, PassWord);
  33.     cin.clear();
  34.     cout << endl;
  35.     if (PassWord == "09211994") cout << "Welcome John";
  36.     else goto StartJPW;
  37.     return 1;
  38. }
  39.  
  40. int PassWordStatic(){
  41.     string PassWord;
  42.     StartSPW:;
  43.     cout << "Password: ";
  44.     getline (cin, PassWord);
  45.     cin.clear();
  46.     cout << endl;
  47.     if (PassWord == "1234") cout << "Fack Yew";
  48.     else goto StartSPW;
  49.     return 1;
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement