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 a qualified ICT professional and educator with advanced academic and professional qualifications including MBA (Master of Business Administration), MBCS (Member of the British Computer Society), MACS CT – Member of Australian Computer Society (Certified Technologist), and PCP (Professional Certification Program). I conduct online and physical classes for students, focusing on building strong theoretical understanding together with hands-on practical skills. My teaching areas include ICT, Computer Science, Programming, Web Development, Database Management, Mathematics, and Business & Accounting Studies. Whatsapp: 9476 75 41 411
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment