阅读给定的C++循环累加代码,程序的输出结果是?
藏药炮制是国家级非物质文化遗产,老药工连续3天记录药材重量,通过循环累加计算总重量。
#include <iostream>
using namespace std;
int main () {
int total = 0;
for (int i = 1; i <= 3; i++) {
total = total + 10;
}
cout << total;
return 0;
}
正在加载题目数据…
子题
该题型需在试卷/作业中作答,单题练习暂不支持
答案解析