Music, asked by divina3140, 1 year ago

Write an algorithin and draw the corresponding flowchart to calculate the factorial of a given number.

Answers

Answered by omasati2004
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