The factorial of a nonnegative integer n is written n! and is defined?

The factorial of a nonnegative integer n is written n! and is defined

as follows:

         n! = n · (n - 1) · (n - 2) · …… · 1 (for values of n greater than 1)

and

         n! = 1 (for n = 0 or n = 1)

Write a program that reads a nonnegative integer and computes and prints its factorial.

1 Answer

Relevance
  • 2 months ago

    Hi, Jonathan.

    See my response to your other question.

Still have questions? Get your answers by asking now.