Question: The loop iterates 5 times. In every iteration, the value of result is updated by n + 3 . If ( result % 2 )

"The loop iterates 5 times. In every iteration, the value of result is updated by n +3.
If (result %2)!=0 evaluates to true, "_" is printed and a continue statement executes. The continue statement causes the rest of the loop body to be skipped. However, the loop continues to execute, using the next value of n.
If (result %2)!=0 evaluates to false, no continue statement executes, so the value of result is printed and the loop continues to execute.
Finally, a newline is printed.
Yours 2_4_6
Expected
_4_6_" can you explain this to me

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!