In the following program segment i, j, m, and n are integer variables. The values of m
Question:
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?
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Discrete and Combinatorial Mathematics An Applied Introduction
ISBN: 978-0201726343
5th edition
Authors: Ralph P. Grimaldi
Question Posted: