Write an algorithin and draw the corresponding flowchart to calculate the factorial of a given number.
Answers
Answered by
17
Answer:
Here's a node.JS program. Do note we use a recursive function and a ternary operator here.
function factorial (number) {
return number === 0 ? 1 : x*factorial(number-1);
}
Check the attachment to see the algorithm:
Read more on Brainly.in - https://brainly.in/question/1193627#readmore
Similar questions
Hindi,
7 months ago
Social Sciences,
7 months ago
Political Science,
1 year ago
Math,
1 year ago
Social Sciences,
1 year ago
Physics,
1 year ago