QuestionQ221

VerifiedControl Flow – Conditional Blocks and Loops

What output will the following code produce?

Question Image

Explanation

The while num > 0 loop prints Hello once per iteration and decrements num from 3 to 0, producing Hello three times.

Community Discussion

No comments yet. Be the first to start the discussion!