Write an algorithm AND draw a flowchart to find factorial of given number.
Algorithm:
Step 1: Start.
Step 2: Declare num, i = 1, factorial = 1.
Step 3: Enter the num.
Step 4: If (i <= num) then goto step 5 else goto step 7
Step 5: factorial = factorial * i.
Step 6: i++, goto step 4.
Step 7: Display factorial.
Step 8: Stop.
Flowchart: