Question

Which of the following pseudocode loops will print the odd integers from 25 to 45. A)...

Which of the following pseudocode loops will print the odd integers from 25 to 45.

A) num = 25
          while num <= 45
                   print num
          end while

B) num = 25
          while num <= 45
                   print num
                   num = num + 1
          end while
C) num = 1
          while num <= 10
                   print num
                   num = num + 2
          end while
B) num = 25
          while num <= 45
                   print num
                   num = num + 2
          end while
0 0
Add a comment Improve this question Transcribed image text
Answer #1

The answer is option D.

num = 25
          while num <= 45
                   print num
                   num = num + 2
          end while

num starts from 25 and in the while loop the num is printed and is incremented by 2 to print all the odd numbers.

Add a comment
Know the answer?
Add Answer to:
Which of the following pseudocode loops will print the odd integers from 25 to 45. A)...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT