小编bha*_*yap的帖子

我无法理解为什么输出在这个for循环中变为10

任何人都可以清楚我的怀疑..为什么这个程序给出10作为输出.你能解释一下机制吗... for循环也有; 在陈述之前

#include <iostream>
using namespace std;

int main() {
    int i ;
    for ( i =0 ; i<10 ; i++);
    {
      cout<<i ;
    }

    return 0;
}
Run Code Online (Sandbox Code Playgroud)

c++ loops for-loop cstdio

0
推荐指数
1
解决办法
60
查看次数

标签 统计

c++ ×1

cstdio ×1

for-loop ×1

loops ×1