Advertisement
Guest User

Untitled

a guest
May 17th, 2018
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7.  
  8. string username = "";
  9. string password = "";
  10. bool loginSuccess = false;
  11.  
  12. cout << "\Waddup! Gimme password, boi.\n\n";
  13.  
  14. do{
  15. cout << "username: ";
  16. cin >> username;
  17. cout << "password: ";
  18. cin >> password;
  19.  
  20. if (username == "Black_Salami" && password == "okon2") {
  21. cout << "\nLogin confirmed\n\n";
  22. loginSuccess = true;
  23. }
  24. else{
  25. cout << "DID YOU REALLY THINK IT WOULD BE SO EASY??? \n";
  26. cout << "One more chance ";
  27. }
  28. }while(!loginSuccess);
  29.  
  30. do
  31. {
  32. int menu;
  33. cout << "Menu" << endl;
  34. cout << "1. Program" << endl;
  35. cout << "2. Wyjscie" << endl;
  36. cin >> wybor;
  37.  
  38. switch (wybor)
  39. {
  40. case 1:
  41. WinExec("program.exe", SW_SHOWNORMAL);
  42.  
  43. break;
  44.  
  45. case 2:
  46.  
  47. exit(NULL);
  48. break;
  49. }
  50.  
  51. } while (true);
  52.  
  53. system("pause");
  54. return 0;
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement