I'm trying to write a factorial for these numbers 1.1+2.2+3.3+4.4+5.5 to infinity.
I thought I'd try with one number and then using recursion to go to infinity.
However I seem to be having a problem trying to get it. It just flashes whenever i run the program. I'm using codeblocks
Should I use a while loop instead?Code:double i; double num = 1.2; double j=1; for (i=1; i<num; i+.1){ j=j*i; } printf("The factorial of %lf is %lf\n",num,j);