Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   need help with recursion (http://www.go4expert.com/forums/help-recursion-t7803/)

sa819 11Dec2007 22:12

need help with recursion
 
Is there any way to use recursion in C to calculate the factorials of numbers above 15?
I made a simple program but it can calculate the values satisfactorily only for numbers from one to fifteen.

Salem 11Dec2007 22:39

Re: need help with recursion
 
1. Post your code.

2. Don't forget the code tags, ie [code][/code] placed around your code.

3. 16! = 20922789888000. Depending on your data types (int, long, float, double), you could well be experiencing either numeric overflow, or loss of precision. Coping with either of them is no easy task.


All times are GMT +5.5. The time now is 01:56.