1.

Below Is A Pseudo Code Read X While(x < 60) Write X X = X*3

Answer»

The last NUMBER in the sequence is 54, what has the USER ENTERED as the initial value of x

Given Last value int seq. = 54.

and in every Loop result multiplied By 3.

So By Backward Approach

54/3=18 => 18/3=6

=> 6/3=2.

So, The Starting Value Is 2

The last number in the sequence is 54, what has the user entered as the initial value of x

Given Last value int seq. = 54.

and in every Loop result multiplied By 3.

So By Backward Approach

54/3=18 => 18/3=6

=> 6/3=2.

So, The Starting Value Is 2



Discussion

No Comment Found

Related InterviewSolutions