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 = "";
- string password = "";
- bool loginSuccess = false;
- cout << "\Waddup! Gimme password, boi.\n\n";
- do{
- cout << "username: ";
- cin >> username;
- cout << "password: ";
- cin >> password;
- if (username == "Black_Salami" && password == "okon2") {
- cout << "\nLogin confirmed\n\n";
- loginSuccess = true;
- }
- else{
- cout << "DID YOU REALLY THINK IT WOULD BE SO EASY??? \n";
- cout << "One more chance ";
- }
- }while(!loginSuccess);
- do
- {
- int menu;
- cout << "Menu" << endl;
- cout << "1. Program" << endl;
- cout << "2. Wyjscie" << endl;
- cin >> wybor;
- switch (wybor)
- {
- case 1:
- WinExec("program.exe", SW_SHOWNORMAL);
- break;
- case 2:
- exit(NULL);
- break;
- }
- } while (true);
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement