program SimpleDrawing; uses crt; procedure DrawSquare(x, y, size: integer); var i, j: integer; begin for i := y to y+size do begin gotoxy(x, i); for j := x to x+size do begin write('*'); end; end; end; begin clrscr; DrawSquare(10, 10, 5); readln; end.
This code will draw a simple square at coordinates (10, 10) with a size of 5. You can adjust the coordinates and size to create different drawings.
Sure! Here is a simple drawing code in Pascal:
program SimpleDrawing;uses crt;
procedure DrawSquare(x, y, size: integer);
var
i, j: integer;
begin
for i := y to y+size do
begin
gotoxy(x, i);
for j := x to x+size do
begin
write('*');
end;
end;
end;
begin
clrscr;
DrawSquare(10, 10, 5);
readln;
end.
This code will draw a simple square at coordinates (10, 10) with a size of 5. You can adjust the coordinates and size to create different drawings.