Advertisement
Guest User

Untitled

a guest
Jul 9th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.76 KB | None | 0 0
  1. //Designers Network
  2. //Demonstrats Logical operators
  3. #include <iostream>
  4. #include <string>
  5.  
  6. using namespace std;
  7.  
  8. int main()
  9.  
  10. {
  11. cout<<"Welcome to game Designers Network\n\n";
  12.     int security=0;
  13.    
  14.     string username;
  15.     cout<<"username:";
  16.     cin>>username;
  17.    
  18.    
  19.     string password;
  20.     cout<<"passoword:";
  21.     cin>>password;
  22.    
  23.     if(username=="mr.hansen" && password=="human")
  24.     {
  25.         cout<<"\nwelcommen mr.Hansen :)";
  26.         security=5;
  27.     }
  28.    
  29.    
  30.     elseif(username=="fru.hansen" && password=="civilization" )
  31.     {
  32.         cout<<"\nwelcommen fru.hansen :)";
  33.         security=5;
  34.     }
  35.    
  36.     elseif(username == "guest" && password == "password")
  37.     {
  38.         cout<<"\nwelcome guest:)\n";
  39.         security=1;
  40.     }
  41.  
  42.     else()
  43.     {
  44.       cout<<"\ninvalid username or password!\n";
  45.     }
  46.  
  47.   return 0;
  48.  
  49.    
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement