Factorial in Wolfram Mathematica

Example for versions Mathics 0.5, Wolfram Mathematica 8.0.4

This example uses built-in factorial function !.
Do is one of the ways to run a loop — it evaluates its first argument for a sequence of numbers defined by the second argument. In this case it’s all values of i from 0 to 16, inclusive, with step of 1.

Do[Print[i, "! = ", i!] , {i, 0, 16, 1}]