#include
#include
using namespace std;
int main() {
int x = 99, y, z, w, s,c=0;
do {
y = x / 100;
z = x % 100 / 10;
w = x % 100 % 10;
s = y + z + w;
++x;
if ((s % 2) == 0)
cout<<setw(4)<<x;
c++; // 统计输出的个数
if (c%5== 0) cout << "\n"; //每五个数据就换行
} while (x < 1000);
cout << endl;
return 0;
}
在五个一换行那儿,我出来的程序确是这样。。。。