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
4
.... end for
end for
That generates all 45^2 = 2025 (i,j) pairs; (11,11), (11.13), ...(11,19), (13,11), (13,13), ....(97,99), (99,99)
If you're only interested in unique pairs, you can easily restrict that to the case where i<=j with just a small change to the inner for loop:
for i := 11 to 99 step 2 do
.... for j = i to 99 step 2 do
.... .... [multiply i times j]
.... end for
end for
That will generate the pairs (11,11), (11,13), ... (11,19), (13, 13), (13,15), ... (13,19), (15,15), ....
MARK IT AS THE BRAINLIEST ANSWER
end for
That generates all 45^2 = 2025 (i,j) pairs; (11,11), (11.13), ...(11,19), (13,11), (13,13), ....(97,99), (99,99)
If you're only interested in unique pairs, you can easily restrict that to the case where i<=j with just a small change to the inner for loop:
for i := 11 to 99 step 2 do
.... for j = i to 99 step 2 do
.... .... [multiply i times j]
.... end for
end for
That will generate the pairs (11,11), (11,13), ... (11,19), (13, 13), (13,15), ... (13,19), (15,15), ....
MARK IT AS THE BRAINLIEST ANSWER
Similar questions
Hindi,
7 months ago
Social Sciences,
7 months ago
Physics,
1 year ago
Physics,
1 year ago
Math,
1 year ago