Perulangan Pada Pascal

Uses crt;
Var
       i,x,j:integer;
Begin
            Clrscr;
            Write(‘Masukan jumlah = ‘);
            Readln(x);
            For i:= 1 to x do
            Begin
                        For j := 1 to I do
                        Begin
                                    Write(‘ * ‘);
                                    Delay(50000);
                        End;
                        Writeln(‘ ‘);
            End;
            For i := (x-1) downto 1 do
                        Begin
                                    For j := 1 to j do
                                    Begin
                                                Write(‘ * ‘);
                                                Delay(50000);
                                    End;
                                    Writeln(‘ ‘);
                        End;
            Readln;
End.

0 komentar:

Posting Komentar

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
This Theme Modified by Kapten Andre based on Structure Theme from MIT-style License by Jason J. Jaeger