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.
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 07:37.|