mirror of
https://github.com/krahets/hello-algo.git
synced 2024-12-25 01:06:30 +08:00
fix(csharp): while loop II comment (#1052)
This commit is contained in:
parent
0d294b1731
commit
85f0071c2a
1 changed files with 1 additions and 1 deletions
|
@ -33,7 +33,7 @@ public class iteration {
|
||||||
int WhileLoopII(int n) {
|
int WhileLoopII(int n) {
|
||||||
int res = 0;
|
int res = 0;
|
||||||
int i = 1; // 初始化条件变量
|
int i = 1; // 初始化条件变量
|
||||||
// 循环求和 1, 2, 4, 5...
|
// 循环求和 1, 4, 10, ...
|
||||||
while (i <= n) {
|
while (i <= n) {
|
||||||
res += i;
|
res += i;
|
||||||
// 更新条件变量
|
// 更新条件变量
|
||||||
|
|
Loading…
Reference in a new issue