//编译通过#include void main(){ int nSum = 1; for (int i=2; i<=100; i++) { if (i%2 != 0) { nSum += i; } } printf("0~100的奇数之和为:%d\n", nSum);}