Question 38

A calculator has two memory buttons, A and B. Value 1 is initially stored in both memory locations. The following sequence of steps is carried out five times:
add 1 to B
multiply A to B
store the result in A
What is the value stored in memory location A after this procedure?

Solution

A calculator has two memory buttons, A and B. Value 1 is initially stored in both memory locations. The following sequence of steps is carried out five times:
add 1 to B
multiply A to B
store the result in A
What is the value stored in memory location A after this procedure?

The value in A and B before the start of the process is 1 and 1 respectively.
In 1st iteration,
After step I, A = 1 and B = 2
After steps II and III, A = 1 * 2 = 2, B = 2

In 2nd iteration,
After step I, A = 2 and B = 3
After steps II and III, A = 2 * 3 = 6, B = 3

In 3rd iteration,
After step I, A = 6 and B = 4
After steps II and III, A = 6 * 4 = 24, B = 4

In 4th iteration,
After step I, A = 24 and B = 5
After steps II and III, A = 24 * 5 = 120, B = 5

In 5th iteration,
After step I, A = 120 and B = 6
After steps II and III, A = 120 * 6 = 720, B = 6

Hence, option D is the correct answer.


Create a FREE account and get:

  • All Quant CAT complete Formulas and shortcuts PDF
  • 35+ CAT previous year papers with video solutions PDF
  • 5000+ Topic-wise Previous year CAT Solved Questions for Free

cracku

Boost your Prep!

Download App