第19738题 单选题
求1到N之间含数字3的数的个数的C++代码中两处横线应填入的代码分别是?

下面C++代码用于求1到N之间正整数中含有3的数的个数,比如123和32都是符合条件的数。代码如下:

int i,j;
int cnt = 0, N;
cout << "请输入正整数N:";
cin >> N;
for (i = 1; (j=i) < N; i++)
 while (j != 0)
  if (j % 10 == 3) {
    cnt +=1;
    __________;
  } else
    __________;
cout << cnt << " ";
{{ option.label }}
子题{{ index + 1 }} {{ child.type_label }}
{{ option.label }}
✓ 正确 ◐ 部分正确 ✗ 错误
程序运行统计
暂无判题统计
提交{{ questionInfo.stats ? questionInfo.stats.submit_count : 0 }}次 正确率{{ statsAccuracy }}%
答案解析