Interesting code. Corrected a few errors, now it works. However fact(14) is less then fact(13).
bumsfeld
Nearly a Posting Virtuoso
1,445 posts since Jul 2005
Reputation Points: 404
Solved Threads: 184
The factorial function doesn't have a prototype in the program. My compiler wouldn't complain about this, since factorial() is above main(), but strictly speaking, it's bad form.
Does your compiler want another include file added to support long long int's?
Adak
Nearly a Posting Virtuoso
1,479 posts since Jun 2008
Reputation Points: 425
Solved Threads: 185