Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- int main()
- {
- string actual_username = "iub", actual_password = "123";
- string given_username, given_password;
- for(int i=0; i<5; i++)
- {
- cout<<"enter username and password\n";
- cin>>given_username>>given_password;
- if(actual_username==given_username)
- {
- if(actual_password==given_password)
- {
- cout<<"login successful\n";
- break;
- }
- else
- {
- cout<<"login failed\n";
- }
- }
- else
- {
- cout<<"login failed\n";
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement