define an algorithm to a factorial of a given number in problem solving technique
Answers
Answered by
0
Answer:
step 1:start
step 2:read n
step 3:initialize i=1 and fact=1
step 4:if i<=n then goto step 5 or else goto step 8
step 5:if n==1 or n==0, then fact=1
step 6:else, fact=fact*i
step 7:increment i value by 1
step 8:Print fact
step 9:stop
Similar questions