Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //simple login
- //using logical operators
- #include <iostream>
- #include <string>
- using namespace std;
- int main()
- {
- cout<<"Simpile login....\n\n";
- int security = 0;
- string username;
- cout<<"username:";
- cin>>username;
- string password;
- cout<<"passoword:";
- cin>>password;
- if(username=="me") && (password=="pass")
- {
- cout<<"\nWelcome my to my network :)\n\n";
- security = 5;
- }
- /* couldn't understand why it outputed this all the time but
- now I understand :D I had to change the value of security to true in the if statment
- so it wouldn't make it "not not" all the time*/
- if(!security)
- {
- cout<<"pass or username incorrect\n";
- }
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement