finding factorial of a number
explain the following how to make a flowchart by finding factorial of a number
Answers
Answer:
Factorial of number a = 1 x 2 x ... x a
At first we start and then take the input in a variable Num. Num is the number of which we need to find the factorial. Then we initialize two more variables Fact and J with the value of 1. Fact will store the result that is the factorial of the number and J is used as and counter to stop when we get our result. Then we put the value of Fact as Fact multiplied by J and increase J by 1. Then we check if J is smaller than or equal to Num because we need to keep multiplying till we reach the number. If J is smaller than or equal to Num the previous step will be again executed. If J is not smaller than or equal to Num that is J is greater than Num then we have got our result and we will display our result in the next step. Then we will stop.
Please mark this as brainliest