Subscribe to RSS Feed

Jumat, 08 Juni 2012

Tulisan 10: Program Looping

Contoh Looping Program pada Pascal

uses crt;
var a,b : integer;
begin
clrscr;
for a:=5 downto 1 do
begin
for b:= a to 5 do
write(b,' ');
writeln;
end;
readln;
end.

Outputnya seperti diawah ini:

5
4 5
3 4 5
2 3 4 5
1 2 3 4 5

0 komentar:

Posting Komentar