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
Chemistry,
19 days ago
History,
19 days ago
Psychology,
19 days ago
Math,
1 month ago
English,
1 month ago
Math,
9 months ago
Science,
9 months ago
Political Science,
9 months ago