I'm writing a program that's supposed to compute and print the factorials of the numbers 1-10, but when I compile and run it, it displays 0 where the factorial of ten should be. I messed with my loops and changed it so it did 1-11, and it printed zero for both numbers over one digit. I'm using %lu in the print statement instead of %d, and I have no idea what's causing this problem!
here's the code:
thanks in advance!
int original, factorial, i;
for (original>=1; original<=10; original++)
for (i=1; i<=original; i++)
printf ("%d %lu\n", original, factorial);