Question: In the following program segment i, j, m, and n are integer variables. The values of m and n are supplied by the user earlier
for i : = 1 to m do
for j : = 1 to n do
if i ≠ j then
print i + j
How many times is the print statement in the segment executed when
(a) m = 10, n = 10;
(b) m = 20, n = 20;
(c) m = 10, n = 20;
(d) m = 20, n = 10?
Step by Step Solution
3.44 Rating (157 Votes )
There are 3 Steps involved in it
a 10 2 10 90 ... View full answer
Get step-by-step solutions from verified subject matter experts
Document Format (1 attachment)
954-M-L-A-L-S (7323).docx
120 KBs Word File
