藏药炮制是国家级非物质文化遗产,老药工连续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; }
10
20
30
40