Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program QRcode;
- uses crt;
- const
- cuad = 254;
- rec = 219;
- var
- I,J:integer;
- num:char;
- kk:string;
- procedure binario;
- begin
- case num of
- '0':kk:='0000';
- '1':kk:='0001';
- '2':kk:='0010';
- '3':kk:='0011';
- '4':kk:='0100';
- '5':kk:='0101';
- '6':kk:='0110';
- '7':kk:='0111';
- '8':kk:='1000';
- '9':kk:='1001';
- end;
- end;
- procedure binary;
- begin
- case num of
- '0': write('*');
- '1': write('|');
- end;
- end;
- procedure dibuja1;
- begin
- for I := 1 to 8 do
- begin
- gotoxy(I,1);
- textcolor(9);
- write(chr(cuad));
- gotoxy(I,8);
- write(chr(cuad));
- gotoxy(I,14);
- write(chr(cuad));
- gotoxy(I,21);
- write(chr(cuad));
- end;
- for I := 14 to 21 do
- begin
- gotoxy(I,1);
- write(chr(cuad));
- gotoxy(I,8);
- write(chr(cuad));
- end;
- for I := 9 to 13 do
- begin
- gotoxy(I,7);
- write(chr(cuad));
- end;
- end;
- procedure dibuja2;
- begin
- for J := 1 to 8 do
- begin
- gotoxy(1,J);
- textcolor(9);
- write(chr(rec));
- gotoxy(8,J);
- write(chr(rec));
- gotoxy(14,J);
- write(chr(rec));
- gotoxy(21,J);
- write(chr(rec));
- end;
- for J := 14 to 21 do
- begin
- gotoxy(1,J);
- write(chr(rec));
- gotoxy(8,J);
- write(chr(rec));
- end;
- for J := 8 to 14 do
- begin
- gotoxy(7,J);
- write(chr(rec));
- end;
- end;
- procedure partevar;
- begin
- Writeln('Ingrese cuatro numeros del 0 al 9');
- writeln();
- read(num);
- binario;
- end;
- procedure grafico;
- begin
- for I := 18 to 21 do
- begin
- binary;
- textcolor(4);
- gotoxy(I,10);
- write(00);
- write(11);
- end;
- end;
- begin
- partevar;
- ClrScr;
- grafico;
- dibuja1;
- dibuja2;
- readkey
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement