Account / Password


/ Published in: C++
Save to your folder(s)

Well Here...

Newbs Only!


Copy this code and paste it in your HTML
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. int main() {
  6. string username; // Created By k9flow
  7. string password;
  8. string user;
  9. string pass;
  10. pass = "myg0t"; // Declaring
  11. user = "myg0t"; // Declaring
  12. int code;
  13. code = rand();
  14. system("cls");
  15. cout << "Username: ";
  16. cin >> username;
  17. if (username == user) {
  18. system("cls");
  19. cout << "Password: ";
  20. cin >> password;
  21. if (password == pass) { // Checks the recorded string "password"
  22. system("cls");
  23. cout << "You Have Logged In!\n";
  24. cout << "\n";
  25. cout << "The Code Is " << code << " !\n"; // Displays Code!
  26. cout << "\n";
  27. system("PAUSE");
  28. return 0;
  29. }
  30. else { // If the string is wrong...
  31. system("cls");
  32. cout << "Wrong Password~!~!\n";
  33. system("PAUSE");
  34. main();
  35. }
  36. return 0;
  37. }
  38. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.