Halaman

Sabtu, 12 Desember 2009

contoh 2, program nested_for (turbo pascal)

program nested_for;
USES
WINCRT;
var
BARIS,KOLOM:INTEGER;
BEGIN
WRITE('INPUT JUMLAH BARIS: ');READLN(BARIS);
WRITE('INPUT JUMLAH KOLOM: ');READLN(KOLOM);
FOR BARIS:=1 TO BARIS DO
   BEGIN
   FOR KOLOM:= 1TO BARIS DO
WRITE(BARIS, '  ');
WRITELN;
WRITELN;
END;
READLN;
DONEWINCRT;
END.