Code:
// Designers Network
//Demonstrates logical operators
#include <iostream>
#include <string>
using namespace std;
int main()
{
cout << "\tGame Designer's Network\n";
int security = 0;
string username;
cout << "\nUsername: ";
cin >> username;
string password;
cout << "Password: ";
cin >> password;
if (username == "Penguinmom" && password == "tree")
{
cout << "\n Hey Mom whats cookin";
security = 5;
}
if (username == "Sammy" && password == "bluebunny")
{
cout << "\nHey Sam What's up";
security = 5;
}
if (username == "Melissa" && password == "ftblchic")
{
cout <<"\nHow's it goin Mel?";
security = 5;
}
if (!security)
cout << "\n Your login failed. Please try again.";
return 0;
}Last edited by My_pet_squirrel (2006-07-14 10:43:51)