Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- cout<<"\n\t\tWELCOME TO ICE WORLD";
- cout<< endl;
- cout<< endl;
- string u,p,u1,p1 ;
- u1="p";
- p1="1234";
- int loginAttempt = 0;
- while (loginAttempt < 3)
- {
- cout<<"\n\t\tUSERNAME :" ;
- cin>>u;
- cout<< endl;
- cout<<"\t\tPASSWORD :";
- cin>>p;
- cout<< endl;
- if (u1==u & p1==p)
- menu();
- else
- cout << "Invalid login attempt. Please try again.\n" << '\n';
- loginAttempt++;
- }
- if (loginAttempt == 3)
- {
- cout << "Too many login attempts! The program will now terminate.";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement