Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.2 迭代与递归部分C#示例代码注释是否有错误 #1051

Closed
Qeynos opened this issue Jan 17, 2024 · 1 comment
Closed

2.2 迭代与递归部分C#示例代码注释是否有错误 #1051

Qeynos opened this issue Jan 17, 2024 · 1 comment
Labels
bug Bug fixes code Code-related

Comments

@Qeynos
Copy link

Qeynos commented Jan 17, 2024

/* while 循环(两次更新) */
int WhileLoopII(int n) {
    int res = 0;
    int i = 1; // 初始化条件变量
    // 循环求和 1, 2, 4, 5...
    while (i <= n) {
        res += i;
        // 更新条件变量
        i += 1; 
        i *= 2;
    }
    return res;
}

循环求和注释是否应该是1,4,10...

@hpstory
Copy link
Contributor

hpstory commented Jan 17, 2024

Hi @Qeynos , 感谢指出,已经通过 #1052 修复

@krahets krahets closed this as completed Jan 17, 2024
@krahets krahets added bug Bug fixes code Code-related labels Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug fixes code Code-related
Projects
None yet
Development

No branches or pull requests

3 participants