Skip to content

Latest commit

 

History

History
23 lines (12 loc) · 924 Bytes

README.md

File metadata and controls

23 lines (12 loc) · 924 Bytes

(Note: documentation generated by ChatGPT)

Factorial

A Java class that provides two methods to compute the factorial of an integer number.

Methods

compute This method takes an integer value as input and returns its factorial as an integer. If the input value is negative, it throws a NegativeValueException with a message indicating that the input value is negative.

computeBigValue This method uses the BigInteger class and takes an integer value as input. It returns the factorial of the input value as a BigInteger. If the input value is negative, it throws a NegativeValueException with a message indicating that the input value is negative.

Example Usage

imagen

This will output:

imagen