24 Mart 2010 Çarşamba
UYGULAMA 22 - 19 Mart 2010
PROGRAM FIBONACCI;
USES CRT, DOS, GRAPH;
VAR gs, gm,i,j:INTEGER;
fibonacci: ARRAY[1..100] OF INTEGER;
BEGIN
gs:=DETECT;
INITGRAPH (gs, gm,'C:\TP\BGI');
IF GRAPHRESULT<>GROK THEN HALT(1);
CLEARDEVICE;
fibonacci[1] := 1;
fibonacci[2] := 1;
FOR i := 3 TO 100 DO
BEGIN
fibonacci[i] := fibonacci[i-2] + fibonacci[i-i];
END;
FOR i := 1 TO 100 DO
BEGIN
SETFILLSTYLE(i MOD 12, i MOD 16);
FILLELLPSE(i, i, fibonacci[100-i],fibonacci[100-i]);
END;
READLN;
CLOSEGRAPH;
END.
Kaydol:
Kayıt Yorumları (Atom)
Hiç yorum yok:
Yorum Gönder