第22886题 判断题
下面能够正常执行的C++代码段用于求1到N之和,N为正整数。因为 i < N + 1,所以是1到N且包含N之和。
tnt = 0;
cout << "请输入正整数:";
cin >> N;
total = 0;
for (i =1; i < N + 1; i++) ;
    total += i;
cout << total;
{{ option.label }}
子题{{ index + 1 }} {{ child.type_label }}
{{ option.label }}
✓ 正确 ◐ 部分正确 ✗ 错误
程序运行统计
暂无判题统计
提交{{ questionInfo.stats ? questionInfo.stats.submit_count : 0 }}次 正确率{{ statsAccuracy }}%
答案解析