Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program materi02b;
- {$mode objfpc}{$H+}
- uses
- {$IFDEF UNIX}{$IFDEF UseCThreads}
- cthreads,
- {$ENDIF}{$ENDIF}
- Classes, StrUtils, crt
- { you can add units after this };
- {$IFDEF WINDOWS}{$R materi02b.rc}{$ENDIF}
- var x,y,z,n,n2,n3 : integer;
- begin
- n := 18;
- {// 3 looping
- n2 := n div 2;
- for x:=1 to n2 do begin
- n3 := n-(x-1)*4;
- for y:=1 to n3 do begin
- for z:=1 to n3 do begin
- gotoxy(x*2+y,x*2+z);
- Write(IfThen((y=1)or(z=1)or(y=n3)or(z=n3),'*',' '));
- end;
- end;
- end; }
- // 2 looping
- n2 := n div 3;
- for x:=1 to n2 do begin
- n3 := n-(x-1)*4;
- for y:=1 to n3 do begin
- gotoxy(x*2+y,x*2+1); Write('*');
- gotoxy(x*2+1,x*2+y); Write('*');
- gotoxy(x*2+y,x*2+n3); Write('*');
- gotoxy(x*2+n3,x*2+y); Write('*');
- end;
- end;
- readln;
- // 1 looping: susah
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement