哪里错了那,求改正
x=2.5#include<stdio.h>
#include<math.h>
main()
{int i,j,p,t=1;
double sum=1,m,a,n=1.0;
for(i=1;i<=15;i++) {
for(j=1;j<=i;j++) {n*=j;}
m=pow(2.5,i);
a=(t*m)/n;
sum+=a;
t=-1;}
printf("%f",sum);
}
#include <stdio.h> int main( void ) { double x = 2.5; unsigned n = 15; double result = 1; double a=-1, b=1; for( unsigned i=0; i!=n; ++i ) { a *= -x; b *= i+1; result += a/b; } printf( "%f\n", result ); }