PROGRAM NESTED;
USES CRT, DOS, GRAPH;
VAR gs, gm,i,j:INTEGER;
x1Koor: ARRAY[1..20] OF INTEGER;
x2Koor: ARRAY[1..20] OF INTEGER;
y1Koor: ARRAY[1..20] OF INTEGER;
y2Koor: ARRAY[1..20] OF INTEGER;
PROCEDURE ESITBOL( X1, Y1, X2, Y2: INTEGER);
BEGIN
FOR i:=1 80 DO
BEGIN
x1Koor[i]:= X1 + ((getmaxx - X1) DIV 20) * (i - 1);
x2Koor[i]:= X2 + ((getmaxx - X2) DIV 20) * (i - 1);
y1Koor[i]:= Y1 + ((getmaxy - Y1) DIV 20) * (i - 1);
y1Koor[i]:= Y2 + ((getmaxy - Y2) DIV 20) * (i - 1);
END;
FOR j:=1 TO 20 DO
BEGIN
LINE(x1Koor[j], y1Koor[j],x2Koor[j], y2Koor[j]);
END;
END;
BEGIN
gs:=DETECT;
INITGRAPH (gs, gm,'C:\TP\BGI');
IF GRAPHRESULT<>GROK THEN HALT(1);
CLEARDEVICE;
SETBKCOLOR(15);
SETCOLOR(9);
ESITBOL(54, 142, 299, 53);
SETCOLOR(13);
LINE(54, 142, getmaxx, getmaxy);
LINE(299, 53, getmaxx, getmaxy);
READLN;
CLOSEGRAPH;
END.
Kaydol:
Kayıt Yorumları (Atom)
Hiç yorum yok:
Yorum Gönder