1-3+5-7....+99-101的结果是多少
1-3+5-7....+99-101的结果是多少大侠们是怎么编的……
我是-51……
不知道是对不对的……
2007-10-31 17:53
2007-10-31 18:13
2007-10-31 22:17
2007-10-31 23:06
2007-10-31 23:09

#include "stdio.h"
main()
{
int i,t=1,s=0;
for(i=1;i<=101;i+=2)
{
t=t*i;
s=s+t;
t=t/i*(-1);
}
printf("%d\n",s);
getch();
}

2007-10-31 23:24
2007-10-31 23:31
2007-11-01 00:11
2007-11-01 08:20