X29: factorial

Write a function in Java called factorial() that will take a positive integer as input and returns its factorial as output.

Examples:

This is an example

Your Answer:

Reset

Practice a different Java exercise

Feedback

Your feedback will appear here when you check your answer.