SHARE
TWEET

Untitled

a guest May 22nd, 2017 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. program login;
  2.  
  3. uses
  4.  
  5. var username : string;
  6.     pass : string;
  7.     c : char;
  8.     x, y, i : integer;
  9.  
  10.  
  11. procedure output_buffer;
  12. begin
  13.      clrscr;
  14.      gotoXY( 7, 0 ); write( 'ovdje upisite korisnicko ime:' );
  15.      gotoXY( 9, 0 ); write( 'ovdje upisite pwd:' );
  16. end;
  17.  
  18. procedure display_login;
  19. begin
  20.      for i := 1 to 5 do begin
  21.          username := '';
  22.          pass := '';
  23.  
  24.          output_buffer;
  25.          gotoXY( 7, 20 );
  26.  
  27.          readln( username );
  28.  
  29.          x := 9; y := 20;
  30.  
  31.          while keypressed and ( not eoln ) do begin
  32.                c := readkey;
  33.                inc( y );
  34.                gotoXY( x, y-1 );
  35.                write( '*' );
  36.                pass := pass + c;
  37.          end;
  38.  
  39.          if pass = good_pass then  begin ok := 1; clrscr; writeln( 'welcome' ); break; end;
  40.      end;
  41.  
  42.      if not ok then begin
  43.         clrscr;
  44.         writeln( 'svih 5 pokusaja fail... XD' );
  45.         readln;
  46.         halt( 0 );
  47.      end;
  48. end;
  49.  
  50. begin
  51.      good_pass := 'sifra';
  52.      display_login;
  53.  
  54.      readln;
  55. end.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top