Kamis, 03 November 2011

Program Huruf X Pascal

program TP;
uses crt;
var n : integer;
procedure X;
var i,j : integer;
begin
if n > 3 then begin
  for i:=1 to n do begin
    for J:=1 to n do begin
      if (i=j) or ((i+j)=(n+1)) then begin
        write('*');
      end else
        write(' ');
    end;
    writeln;
  end;
end else
  write('n tidak mencukupi');
end;

begin
clrscr;
write('masukkan n : '); readln(n);
X;
readln;
end.

0 komentar:

Posting Komentar

Related Posts Plugin for WordPress, Blogger...

 
Design by Wordpress Theme | Bloggerized by Free Blogger Templates | JCPenney Coupons