This commit is contained in:
krahets
2024-01-22 19:05:40 +08:00
parent c71f25c4ad
commit 4556e0971c
5 changed files with 521 additions and 143 deletions

View File

@ -461,7 +461,7 @@ For example, in the following code, the condition variable $i$ is updated twice
int WhileLoopII(int n) {
int res = 0;
int i = 1; // 初始化条件变量
// 循环求和 1, 2, 4, 5...
// 循环求和 1, 4, 10, ...
while (i <= n) {
res += i;
// 更新条件变量