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.

For X = 3, Y = 2 and N = 100, how many steps are performed before the machine stops?

Show Hint

Multiply X by Y, then add 1 to Y, and stop the moment X reaches or passes 100.
Updated On: Jul 15, 2026
  • 2
  • 3
  • 4
  • 5
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is C

Solution and Explanation

Step 1: Understanding the Concept.
At each step, replace X with the product of the current X and Y, then increase Y by 1. Stop as soon as the new X is at least N.

Step 2: Run the steps.
Start: X = 3, Y = 2.
Step 1: X = 3 x 2 = 6, Y = 3. (6 < 100, continue)
Step 2: X = 6 x 3 = 18, Y = 4. (18 < 100, continue)
Step 3: X = 18 x 4 = 72, Y = 5. (72 < 100, continue)
Step 4: X = 72 x 5 = 360, Y = 6. (360 &ge; 100, stop)

Step 3: Final Answer.
The machine performs 4 steps before it stops, so option C is correct.
Was this answer helpful?
0
0