+ 2
how to enter password three times and count your account is blocked program c++
2 Answers
+ 7
string user_pass;
const string password = "cookies_omg_wow512";
int count = 0;
while (count < 3)
{
cin >> user_pass;
if (user_pass != password)
{
cout << "Not wow." << endl;
count++;
}
else
{
cout << "Much wow." << endl;
break;
}
}
if (count == 3)
{
cout << "You banned lol" << endl;
}
else
{
cout << "Welcome to cookieland" << endl;
}
+ 3
thank you Hatsy