一、阅读程序, 写出下列代码完成的功能。
#include<stdio.h>main(){int i , sum=0;for (i=2; i<=100; i=i+2) sum+=i;printf(“%d\n”, sum);}
求2到100的偶数和
计算1~100所有的偶数和。
求100以内的偶数和