Write a program that performs the following: a variable starts with
a value of one. Construct a loop that executes until the variable is larger
than 100. In each loop execution, calculate the factorial of the variable
if the variable is less than 20. Then double the value of the variable
and add one to it. Output the total number of times the loop is executed,
and the sum of all of the factorials that were calculated. Make the
conditions general, so that they can be set at the top of the program,
or entered by the user. Make sure that you comment your program, and
pay attention to nice formatting for readability.
Do this in as many as you can of Fortran, C, Python, and IDL! Use a
makefile to compile your programs (where necessary) and to execute all four.
Bonus: compute the factorial using a recursive function.