Computer Science, asked by selvarani27, 5 months ago

Trace the step by step execution of algorithm for factorial (3) factorial (n)-----inputs:n is an integer,ngreater than or equal to 0-----outputs:F=n! f,i=1,1 while i less than n f,i:= f*i,i+1​

Answers

Answered by nihal200834
1

Explanation:

Factorial of a non-negative integer, is multiplication of all integers smaller than or equal to n. For example factorial of 6 is 6*5*4*3*2*1 which is 720.

Recursive Solution:

Factorial can be calculated using following recursive formula.

n! = n * (n-1)!

n! = 1 if n = 0 or n = 1

Answered by sunainakbarkhan
0

Explanation:

hi please follow me and thank me

Similar questions