第19767题 判断题
判断两段C++实现1-10求和的代码运行结果是否相同,以及for循环是否通常可由while循环实现
int tnt;
int i;

tnt = 0;
for (i = 1; i < 10 + 1; i++)
  tnt += i;
cout << tnt << endl;
int tnt;
int i;

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