Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program login;
- uses
- var username : string;
- pass : string;
- c : char;
- x, y, i : integer;
- procedure output_buffer;
- begin
- clrscr;
- gotoXY( 7, 0 ); write( 'ovdje upisite korisnicko ime:' );
- gotoXY( 9, 0 ); write( 'ovdje upisite pwd:' );
- end;
- procedure display_login;
- begin
- for i := 1 to 5 do begin
- username := '';
- pass := '';
- output_buffer;
- gotoXY( 7, 20 );
- readln( username );
- x := 9; y := 20;
- while keypressed and ( not eoln ) do begin
- c := readkey;
- inc( y );
- gotoXY( x, y-1 );
- write( '*' );
- pass := pass + c;
- end;
- if pass = good_pass then begin ok := 1; clrscr; writeln( 'welcome' ); break; end;
- end;
- if not ok then begin
- clrscr;
- writeln( 'svih 5 pokusaja fail... XD' );
- readln;
- halt( 0 );
- end;
- end;
- begin
- good_pass := 'sifra';
- display_login;
- readln;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement