#include <cstdlib>
#include <iostream>
#include <conio.h>
using namespace std;
int main()
{
char haslo[24],c;
char haslop[24] = "szkolyete";
int z;
bool p;
do
{
z=0;
p=0;
cout << "Podaj haslo: " << endl;
while((c = getch()) != 13)
{
cout << "*";
haslo[z++]=c;
}
for(int i=0;i<z;i++)
{
if (haslo[i] !=haslop[i]) p=1;
}
if(!p)cout << endl<<"Haslo jest poprawne"<<endl;
else cout <<endl<< "Haslo jest bledne"<<endl;
}
while(p==1);
getch();
return 0;
}