第23017题 单选题
关于C++统计1-999中与5有关数的代码,下列说法正确的是
cnt = 0;
for (i = 1; i < 1000; i++) {
    if (i % 5 == 0) {
        cnt += 1;
        continue;
    }
    j = i;
    while (j > 0)
        if (j % 10 == 5) {
            cnt += 1;
            break;
        } else
            j /= 10;
}
cout << cnt;
{{ option.label }}
子题{{ index + 1 }} {{ child.type_label }}
{{ option.label }}
✓ 正确 ◐ 部分正确 ✗ 错误
程序运行统计
暂无判题统计
提交{{ questionInfo.stats ? questionInfo.stats.submit_count : 0 }}次 正确率{{ statsAccuracy }}%
答案解析