第19252题 单选题
执行C++代码统计千位与个位的和等于中间两位的四位数数量,横线处应填入的代码是?
int count = 0;
int a, bc, d, tmp;
for (int i = 1000; i <= 9999; i++) {
    a = (tmp = i) / 1000;
    ________________________
    bc = tmp / 10;
    d = tmp - bc * 10;
    if (a + d == bc) {
        count++;
    }
}
cout << count;
{{ option.label }}
子题{{ index + 1 }} {{ child.type_label }}
{{ option.label }}
✓ 正确 ◐ 部分正确 ✗ 错误
程序运行统计
暂无判题统计
提交{{ questionInfo.stats ? questionInfo.stats.submit_count : 0 }}次 正确率{{ statsAccuracy }}%
答案解析