Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- string y="user";
- string x="pass";
- int i=1;
- int main()
- {
- while(i){
- cout<<"Username:";
- cin>>y;
- cout<<"Password:";
- cin>>x;
- if(y=="Bob" && x=="Happy"){
- cout<<"Your pin is ####"<<endl;
- cout<<"You live at ####"<<endl;
- i=0;
- }else if(x!="Happy"){
- cout<<"Your password is incorrect"<<endl;
- }else if(y!="Bob"){
- cout<<"This username does not exist"<<endl;
- }else{
- cout<<"Insufficient data"<<endl;
- }
- }
- }
Add Comment
Please, Sign In to add comment