#include <stdio.h>
#include<math.h>
int main()
{
int sum = 0 , i = 1 , flag = 1;
while(i<=100)
{ sum=sum+flag;
flag=i*pow((-1),i-1); //pow在这看不懂什么意思[ double pow(double x, double y);是求x的y次幂 ]
i++;
}
printf("sum=%d\n",sum);
蓝环章鱼
qq_空白_300
相关分类