Write algorithm for finding factorial of a number
Answers
Answered by
6
So, the algorithm for the factorial goes like this:
input a number n.
set variable final as 1.
final <= final * n.
decrease n.
check if n is equal to 0.
if n is equal to zero, goto step 8 (break out of loop)
else goto step 3.
print the result final.
Similar questions
English,
6 months ago
Hindi,
6 months ago
English,
1 year ago
World Languages,
1 year ago
Science,
1 year ago