#include <stdio.h>
int main()
{
int i, sum=0;
for (i = 0; i <= 100; i++)
{
if(i%2==0)
sum += i;
}
printf("%d\n", sum);
return 0;
}
08-26
315
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-18
5722
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
#include <stdio.h>
int main()
{
int i, sum=0;
for (i = 0; i <= 100; i++)
{
if(i%2==0)
sum += i;
}
printf("%d\n", sum);
return 0;
}