program printnumpattern;
var
i,j:integer;
begin
i:=1;
while i<=10 do {first repetition}
begin
j:=1;
while j<=i do {second repetition within first}
begin
write(j,#9); {print numbers horizontally}
j:=j+1;
end; {second repetition end}
write(#13#10); {to goto next line}
i:=i+1;
end;{first repetition end}
write('Press Enter to exit');
readln;
end.
Theory, Programming Exercises, Past Paper Questions and Answers, Assignments with Answers Practical Videos
Learn ICT By Examples
Pascal program print number pattern
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment