Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Designers Network
- //Demonstrats Logical operators
- #include <iostream>
- #include <string>
- using namespace std;
- int main()
- {
- cout<<"Welcome to game Designers Network\n\n";
- int security=0;
- string username;
- cout<<"username:";
- cin>>username;
- string password;
- cout<<"passoword:";
- cin>>password;
- if(username=="mr.hansen" && password=="human")
- {
- cout<<"\nwelcommen mr.Hansen :)";
- security=5;
- }
- elseif(username=="fru.hansen" && password=="civilization" )
- {
- cout<<"\nwelcommen fru.hansen :)";
- security=5;
- }
- elseif(username == "guest" && password == "password")
- {
- cout<<"\nwelcome guest:)\n";
- security=1;
- }
- else()
- {
- cout<<"\ninvalid username or password!\n";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement