Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在此处输入图像描述
我想计算给定值的总和,但收到此错误
更改var为int
var
int
for (int value in values) { sum += value; }
和改变
values = ['1, 3, 5, 7, 9']
至
values = [1, 3, 5, 7, 9]