Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- int main()
- {
- using std::cout;
- using std::cin;
- using std::string;
- string username = "";
- string password = "";
- cout << "enter your username \n";
- cin >> username;
- cout << "enter your password \n";
- cin >> password;
- if (username == "jane1234" && password == "anything")
- {
- cout << "correct username and password \n";
- }
- else if (username == "jane1234" && password != "anything")
- {
- cout << "incorrect password \n";
- }
- else if (username != "jane1234" && password == "anything")
- {
- cout << "incorrect username\n";
- }
- else
- {
- cout << "inorrect username or password \n";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement