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
Sunday, October 14, 2018
Pascal program print number pattern
Labels:
ICT,
Programming
I am Apputhurai Ganeshananthan, an experienced educator with over two decades of teaching and ICT industry experience. I currently conduct ICT, Mathematics, and Business & Accounting Studies classes through both online and physical learning platforms. Whatsapp: 9476 75 41 411
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment