1-100之间的偶数和
#include<stdio.h> int main() { int i =1; int sum = 0; for(i = 0; i <101; i++) { if( i % 2 == 0) { sum += i; } } printf("%d\n",sum); }
本文来自博客园,作者:Bytezero!,转载请注明原文链接:https://www.cnblogs.com/Bytezero/p/15071550.html
#include<stdio.h> int main() { int i =1; int sum = 0; for(i = 0; i <101; i++) { if( i % 2 == 0) { sum += i; } } printf("%d\n",sum); }
本文来自博客园,作者:Bytezero!,转载请注明原文链接:https://www.cnblogs.com/Bytezero/p/15071550.html