Create easyChallenge10.txt

a) Write a function factorial(x), which returns the factorial of a number x.
Example: 5! = factorial(5) = 5 * 4 * 3 * 2 * 1 = 120
Further reading
b) Write a function nPr(n, k), which returns the result of n! / ((n-k)!)
Example: nPr(4,2) = 4! / ((4-2)!) = 24 / 2 = 12
Further reading
c) Write a function nCr(n, k), which returns the result of n! / ((n-k)! * k!)
Example: nCr(4,2) = 4! / ((4-2)! * 2!) = 24 / (2! * 2!) = 6
Further reading
d) Create a function called pascalsTriangle(n), which prints n rows of Pascal's triangle (the numbers should be seperated by whitespaces) to the console.
For the first row you need nCr(0,0), for the second row nCr(1,0) and nCr(1,1), for the third row nCr(2,0), nCr(2,1) and nCr(2,2), ... and for the n-th row nCr(n,0), nCr(n,1), ... and nCr(n,n).
Bonus challenge: Make sure every row is centered.