Advertisement
Guest User

Untitled

a guest
Jan 10th, 2017
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1.  
  2. #include <iostream>
  3.  
  4. int main()
  5. {
  6. using std::cout;
  7. using std::cin;
  8. using std::string;
  9.  
  10. string username = "";
  11. string password = "";
  12. cout << "enter your username \n";
  13. cin >> username;
  14.  
  15. cout << "enter your password \n";
  16. cin >> password;
  17.  
  18. if (username == "jane1234" && password == "anything")
  19. {
  20. cout << "correct username and password \n";
  21. }
  22. else if (username == "jane1234" && password != "anything")
  23. {
  24. cout << "incorrect password \n";
  25. }
  26. else if (username != "jane1234" && password == "anything")
  27. {
  28. cout << "incorrect username\n";
  29. }
  30. else
  31. {
  32. cout << "inorrect username or password \n";
  33. }
  34. return 0;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement