/*
============================================================================
Name : C_test.c
Author :
Version :
Copyright : Your copyright notice
Description : Hello World in C, Ansi-style
============================================================================
*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main(void) {
int n=100;
int i;
int sum=0;
for(i=0;i<=n;i++){
if(i%2==0){
sum=sum+i;
}
}
printf("%d\n",sum);
puts("end");
return EXIT_SUCCESS;
}
温馨提示:答案为网友推荐,仅供参考