VILL- DEBANDI, AMTA, HOWRAH PIN-711410 Phone-9836357266
17. 1!+2!+3!+...n :—
#include<stdio.h>
int main()
{
int i,f,n,sum;
printf("enter a value of n ");
scanf("%d",&n);
sum=0,f=1;
for(i=1;i<=n;i++)
f=f*i;
sum=sum+f;
}
printf("%d",sum);
return 0;
No comments:
Post a Comment