#include<iostream>
using namespace std;
int main() {
bool isMatch = false;
string userInput, pass = "defaultpass";
int counter = 0;
do{
cin >> userInput;
counter ++:
isMatch = (userInput == pass);
} while( !isMatch && (counter <= 3));
if(!isMatch)
cout << "密碼已鎖" << endl;
return 0;
}
:P
should be right, but didn't check to make sure if correct
|