TA贡献143条经验 获得超187个赞
#include <iostream> using namespace std; int main(){ int i = 1; int j = 0; while (i < 100) { j += i; i += 2; } cout<<j<<endl; return 0; }
TA贡献23条经验 获得超2个赞
int i = 0;int j= 0;while (i++ < 100){if (i%2 == 1){j += i;}}
举报