循环读程序
该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。
题目描述
阅读程序,判断输出结果。
#include <iostream>
using namespace std;
int main() {
int s = 0;
for (int i = 1; i <= 4; i++) {
s += i;
}
cout << s;
return 0;
}
{{ select(1) }}
- A.
4 - B.
6 - C.
10 - D.
15