第20111题 单选题
以下C++代码用于收集1到35中能被7整除的数字,空缺处应填入的代码是?

题目要求找出从1到35中能被7整除的数字,即[7, 14, 21, 28, 35],对应代码如下:

#include <iostream>
using namespace std;

int main() {
  int arr[35];

  int count = 0;
  for (int i = 1; i <= 35; i++) {
    if (i % 7 == 0)
      __________________________ // 在此处填入代码
  }

  for (int i = 0; i < count; i++)
    cout << arr[i] << endl;

  return 0;
}
{{ option.label }}
子题{{ index + 1 }} {{ child.type_label }}
{{ option.label }}
✓ 正确 ◐ 部分正确 ✗ 错误
程序运行统计
暂无判题统计
提交{{ questionInfo.stats ? questionInfo.stats.submit_count : 0 }}次 正确率{{ statsAccuracy }}%
答案解析