Laman

Minggu, 06 Mei 2012

Contoh Looping Program Pascal Tiga Variable 2

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

Outputnya adalah:

9
8 7
6 5 4
3 2 1 0

Tidak ada komentar:

Posting Komentar