Question:

Instructions: A numerical machine accepts two values X and Y. At every step, it updates the values as X = X times Y, and Y = Y + 1. The machine stops as soon as X becomes greater than or equal to N.

Using the same values as before (X = 3, Y = 2, N = 100), what is the final value of Y?

Show Hint

Y simply increases by 1 each step, so its final value is the starting Y plus the number of steps run.
Updated On: Jul 15, 2026
  • 4
  • 5
  • 6
  • 20
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is C

Solution and Explanation

Step 1: Reuse the earlier simulation.
Tracking Y alongside X: start Y = 2; after step 1, Y = 3; after step 2, Y = 4; after step 3, Y = 5; after step 4, Y = 6, at which point X = 360 ≥ 100 and the machine stops.

Step 2: Final Answer.
The final value of Y, at the moment the machine stops, is 6, so option C is correct.
Was this answer helpful?
0
0