Skip to content

Factorial (mind the size)

Factorial (mind the size)

n! is 1 × 2 × … × n, and 0! is 1. It grows fast20! is over two billion billion — so the method returns a long, not an int, or the answer would overflow. Multiply from 2 up to n.

Log in or create account

IGCSE & A-Level