
вот прога
program parol;
uses crt;
const password:string = '123';
var y:integer;
passwordstring:string;
Procedure PasswordWindow ;
Begin
TextBackGround (Black);
TextColor (White);
ClrScr;
gotoxy(27,10);
write('ЙНННННННННННННННННННННННННН»');
gotoxy (27,12);
write('є є');
gotoxy (27,13);
write('є є');
gotoxy (27,14);
write('є є');
gotoxy(27,11);
write('є є');
gotoxy(27,15);
write('ИННННННННННННННННННННННННННј');
End;
BEGIN
clrscr;
Y := 3;
Repeat
ClrScr;
PasswordWindow;
gotoxy(34,10);
write('Введите пароль');
if (y=3) or (y=2) then
begin
gotoxy(29,14);
writeln ('У вас осталось 'y' попытки');
end;
if y=1 then
begin
gotoxy(29,14);
writeln ('у вас осталось 'y' попытка');
end;
gotoxy(36,12);
readln (passwordstring);
if passwordstring <> Password Then
Begin
TextColor (Red);
gotoxy(33,12);
Write ('непрвильно');
y:=y-1;
End;
If PasswordString = Password Then
Begin
TextColor (Green);
gotoxy(34,12);
Write ('правильно');
End;
Readkey;
Until (PasswordString = Password) Or (Y = 0);
If Y = 0 Then
exit;
end.