Draw a flow chart and write an algorithm for a program that multiplies all two digit odd numbers. (You must use looping).
Answers
Answered by
1
The two digit odd numbers can be referred as the following sequence (11, 13, 15, ..., 95, 97, 99). It is an arithmetic sequence or "arithmetic progression".
When the terms are integers, one can generate the elements according to order to use the ‘for’ loop: for i := 11 to 99 step 2 do.
For j = 11 to 99 step 2 do. .... .... [multiply i times j]. .... end for. end for.
That would generate all 45^2 = 2025 (i,j) pairs; (11,11), (11.13), ...(11,19), (13,11), (13,13), ....(97,99), (99,99).
Similar questions
Social Sciences,
7 months ago
History,
1 year ago
Math,
1 year ago
Math,
1 year ago
Biology,
1 year ago