#include <stdio.h>
#include <stdlib.h>
int main()
{
long i;
long term,sum;
for(i=1;i<=99;i=i+2)
{
term=i*(i+1)*(i+2);
sum=sum+term;
}
printf("sum=%d\n",sum);
return 0;
}
习题6.2(2)
最新推荐文章于 2022-07-14 23:14:15 发布
#include <stdio.h>
#include <stdlib.h>
int main()
{
long i;
long term,sum;
for(i=1;i<=99;i=i+2)
{
term=i*(i+1)*(i+2);
sum=sum+term;
}
printf("sum=%d\n",sum);
return 0;
}