Computer Science, asked by barkaviramesh, 2 months ago

READ N
set a=0
set b=1
set c=1
repeat
b=b*c
a=a+(b/c)
c=c+1
until c<N
print a​

Answers

Answered by Tulika446
0

Answer:

Suppose you have taken N=3

b=b+c =1

a=a(b/c)=1

c=c+1=2

again!

b=b*c=2

a=a+(b/c)=2

again!!

c=c+1=3

b=b*c=2*3=6

a=a+(b/c)=2+(6/3)=2+2=4

that is c=c+1 will not work now as we've seen c =N according to question c must looped untill c<N so the ans is a=2

Similar questions