PROGRAM PASSWORD;
USES CRT;
VAR
X :INTEGER;
PW:STRING;
BEGIN
CLRSCR;
X:=3;
WHILE X>=1 DO BEGIN
WRITE('INPUT PASSWORD :');
READLN(PW);
IF (PW <> 'SEMANGAT') AND (X>=2) THEN
WRITELN('PASSWORD YANG ANDA MASUKKAN SALAH, KESEMPATAN TINGGAL',' ',X-1,'LAGI');
IF (PW <> 'SEMANGAT') AND (X=1) THEN
WRITE('INVALID PASSWORD');
IF PW='SEMANGAT' THEN BEGIN
WRITE('PASSWORD BENAR, ANDA DAPAT LOGIN');
X:=0;
END;
X:=X-1;
END;
READLN;
END.
0 comments:
Post a Comment