Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int fact(int n)
- {
- int i,b=1;
- for(i=1;i<=n;i++){
- b*=i;
- }
- return b;
- }
- int main()
- {
- int sum;
- sum=fact(1)/1+fact(2)/2+fact(3)/3+fact(4)/4+fact(5)/5;
- printf("The sum of the series is:%d\n\n",sum);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement