write an algorithm to find out factorial of given number
Answers
Answered by
8
Explanation:
Step 1 : Start.
Start 2 : Read n.
Start 3 : Initialize counter variable i to 1 and fact to 1.
Start 4 : if i <= n go to step 5 otherwise goto step 7.
Start 5 : calculate fact = fact * i.
Start 6 : increment counter variable i and goto step 4.
Start 7 : Write fact.
Start 8 : Stop.
Answered by
7
Answer:
- Step 1 : Start.
- Start 2 : Read n.
- Start 3 : Initialize counter variable i to 1 and fact to 1.
- Start 4 : if i <= n go to step 5 otherwise goto step 7.
- Start 5 : calculate fact = fact * i.
- Start 6 : increment counter variable i and go to step 4.
- Start 7 : Write fact.
- Start 8 : Stop.
Similar questions