Factorial calculator in C