15 Nisan 2010 Perşembe
UYGULAMA 25 - 2 Nisan 2010
PROGRAM NESTED;
USES CRT, DOS, GRAPH, PRINTER;
VAR GRAFIKSURUCU, GRAFIKKONUMU,i,j:INTEGER;
PROCEDURE CEMBER (XBOL, YBOL: INTEGER );
BEGIN
FOR i:= 1 TO XBOL+1 DO
BEGIN
FOR j:=1 TO YBOL+1 DO
BEGIN
IF(( i MOD 2 = 0 ) AND (j MOD 2 = 0)) THEN
SETFILLSTYLE(1,0)
ELSE IF ((i MOD 2 =1) AND( j MOD 2 =1)) THEN
SETFILLSTYLE (1, 0)
ELSE
SETFILLSTYLE (1,15);
FILLELLIPSE ( 0+GETMAXX DIV XBOL* (i-1),
0+GETMAXY DIV YBOL*(j-1),
GETMAXX DIV (XBOL*2),
GETMAXY DIV (YBOL*2));
END;
END;
FOR i:= 1 TO XBOL DO
BEGIN
FOR j:=1 TO YBOL DO
BEGIN
SETCOLOR (0);
SETFILLSTYLE (1,15);
FILLELLIPSE ( GETMAXX DIV (XBOL * 2) + GETMAXX DIV XBOL* (i-1),
GETMAXY DIV (YBOL * 2)+GETMAXY DIV YBOL*(j-1),
GETMAXX DIV (XBOL*2),
GETMAXY DIV (YBOL*2));
END;
END;
END;
BEGIN
GRAFIKSURUCU:=DETECT;
INITGRAPH (GRAFIKSURUCU, GRAFIKKONUMU,'C:\PROGRA~1\TP\BGI');
IF GRAPHRESULT<>GROK THEN HALT(1);
CLEARDEVICE;
CEMBER (15,15);
READLN;
CLOSEGRAPH;
END.
Kaydol:
Kayıt Yorumları (Atom)
Hiç yorum yok:
Yorum Gönder