Tuesday, January 22, 2013

Pascal

Membuat
*           *
**       **
***    ***
********
dst

===============

program coba;
uses crt;
var
 x, y, z, n : integer;

begin

clrscr;

 writeln('====== PROGRAM LOOPING =====');
 writeln;writeln;
 write('Banyak Deret * = ');readln(n);

 for x:= 1 to n do
 begin
 for y:= 1 to x do
 write('*');
 for z:=x  to 2*n-x-1 do
 write(' ');
 for y:=1 to x do
 write('*');
 writeln;
 end;

 writeln;writeln;
 writeln('Created by Bovit Leonardo Tampubolon');


 readkey;
 end.

No comments:

Post a Comment

Popular Posts