#include <cstring>
#include <iostream>
#define PASSWORD "SHER"
using namespace std;
int main()
{
cout << "3 chances only\n";
char word[5];
bool flag = false;
cout << "I'M □□□□LOCKED.\n";
for (int i = 0; i < 3; i++)
{
if (i > 0)
cout << 3 - i << " chances left\n";
cout << "the password is:";
cin >> word;
if (strcmp(word, PASSWORD) == 0)
{
flag = true;
break;
}
}
if (flag)
{
system("cls");
cout << "PASS";
system("color AF");
}
else
{
system("cls");
cout << "OVER";
system("color CF");
}
return 0;
}
你看过夏洛克吗?
最新推荐文章于 2022-04-27 23:05:34 发布