📜  哪个代码块将对从 1 到 n(包括 n)的数字求和并将其存储在变量“sum”中? - 无论代码示例

📅  最后修改于: 2022-03-11 14:56:56.756000             🧑  作者: Mango

代码示例1
int sum = 0;
for (int count = 1; count <= n; count++) {
    sum = count;
}