Computer Science, asked by Johndavi, 1 year ago

Write algorithm for finding factorial of a number

Answers

Answered by Anonymous
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