Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- main()
- {
- int code;
- string username, password;
- do
- {
- system("cls");
- cout << "-Main Manu-" << endl;
- cout << "[1]Login" << endl;
- cout << "[2]Exit" << endl;
- cout << "\nEnter choice: ";
- cin >> code;
- system("cls");
- if(code == 1)
- {
- cout << "-Login Menu-";
- cout << "\nEnter Username: ";
- cin.ignore();
- getline(cin, username);
- cout << "Enter Password: ";
- getline(cin, password);
- if(username == "user" && password == "pass")//Validation
- {
- cout << "Login Succesfully" << endl;
- system ("pause");
- do
- {
- system("cls");
- cout << "You are so ugly" << endl;
- cout << "Do you want to logout? Press 1: ";
- cin >> code;
- if (code == 1)
- {
- }
- else
- {
- cout << "Invalid response. :)" << endl << endl;
- system ("pause");
- }
- }
- while (code != 1);
- }
- }
- }
- while (code != 2);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement