#include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;
int main();
bool strget(char password)
{
char Local[10] = "AP4ssW0rD";
if(password == *Local) {
return true;
} else {
return false;
}
}
int main()
{
int Attempts = 1;
char entered[10];
cout << endl << "Password: ";
cin >> entered;
while(Attempts != 3) {
if(strget(*entered)) {
cout << "Welcome to the CIA...\n\n";
break;
} else {
cout << "Failure" << endl;
cout << endl << "Attempts: " << Attempts << " out of 3" << endl << "Password: ";
cin >> entered;
}
Attempts++;
}
cin.ignore();
cin.get();
return 0;
}