Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- int main()
- {
- string username = "jeremy";
- string userpass = "badass";
- string user = "na";
- string pass = "na";
- bool loggedin = 0;
- cout << "Please enter your UserName: ";
- cin >> user;
- cout << "Please enter your password: ";
- cin >> pass;
- if (userpass == pass && username == user) {
- bool loggedin = 1;
- }
- else {
- bool loggedin = 0;
- }
- if (loggedin == 1) {
- cout << "You have successfully Logged In!" << endl;
- system("pause");
- return 1;
- }
- else {
- cout << "Wrong Password or UserName" << endl;
- system("pause");
- return 0;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement