Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- double fact(int n);
- int main(void)
- {
- int i;
- for(i=0; i<500; i++)
- printf("Factorial(%d) í¨ě 결곟 = %f\n", i, fact(i));
- return 0;
- }
- double fact(int n)
- {
- double result = 0;
- if(n <= 1)
- result = 1;
- else
- result = n * fact(n-1);
- return result;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement