Guest User

Untitled

a guest
Mar 10th, 2017
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. #include<iostream>
  2. using namespace std;
  3. string y="user";
  4. string x="pass";
  5. int i=1;
  6. int main()
  7. {
  8. while(i){
  9. cout<<"Username:";
  10. cin>>y;
  11. cout<<"Password:";
  12. cin>>x;
  13. if(y=="Bob" && x=="Happy"){
  14. cout<<"Your pin is ####"<<endl;
  15. cout<<"You live at ####"<<endl;
  16. i=0;
  17. }else if(x!="Happy"){
  18. cout<<"Your password is incorrect"<<endl;
  19. }else if(y!="Bob"){
  20. cout<<"This username does not exist"<<endl;
  21. }else{
  22. cout<<"Insufficient data"<<endl;
  23. }
  24. }
  25. }
Add Comment
Please, Sign In to add comment