designers_network.cpp
来自「the source of dev_c++ most of them for 」· C++ 代码 · 共 49 行
CPP
49 行
// 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 == "S.Meier" && password == "civilization")
{
cout << "\nHey, Sid.";
security = 5;
}
if (username == "S.Miyamoto" && password == "mariobros")
{
cout << "\nWhat's up, Shigeru?";
security = 5;
}
if (username == "W.Wright" && password == "thesims")
{
cout << "\nHow goes it, Will?";
security = 5;
}
if (username == "guest" || password == "guest")
{
cout << "\nWelcome, guest.";
security = 1;
}
if (!security)
cout << "\nYour login failed.";
return 0;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?