Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- do {
- cout << "\t\t------------------\n";
- cout << "\t\tLOGIN CREDENTIALS\n";
- cout << "\t\t------------------\n";
- cout << "Enter Username : ";
- cin >> username;
- cout << "Enter Password : ";
- cin >> password;
- if((username == USERNAME && password == PASSWORD) || (username == USERNAME1 && password == PASSWORD1)
- || (username == USERNAME2 && password == PASSWORD2) || (username == USERNAME3 && password == PASSWORD3)) {
- insert=true;
- } else {
- //cout<<"Incorrect user and password. Try again."<<endl;
- attemps++;
- }
- } while(insert == false && attemps < 3);
- if (insert == false) {
- cout <<"Failed. Bye"<<endl;
- exit(1);
- }
- else {
- cout<<"\n"<<endl;
- cout<<"\nSuccesful authentication!"<<endl;
- cout<<"\n"<<endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement