CBSE BOARD X, asked by jagadeeshdamodaran, 7 months ago

What should be the output of the code if user input N as 10?
READ N
2 SET a = 0
3 SET b = 1
4 SET C = 1
5 REPEAT
6 b = b c
7 a = a + (b / c)
8c
C + 1
9 UNTIL C <N
10 Print a​

Answers

Answered by priyankabuddhepatil
1

Explanation:

explan and ans

plz tell ansee

Answered by mindfulmaisel
11

17052

Output:

A certain algorithm is given to us and we have to find the output through it.

In the algorithm, first we have to set the value of a, b, and c as,

a = 0

b = 1

C = 1

then, b = b*c = 1

a = a + (b / c) = 1

C = C + 1 = 2

Now, we have to run the program until C<N, i.e., 2< 10

The program will run till the value of C reaches to 9, and the final value of "a" will be 17052.

Similar questions