【教程】C++for循环 for循环基础知识 如果你需要输出1~3,那么我猜你会这样做: #include <iostream> using namespace std; int main () { cout<<1<<endl; cout<<2<<endl; cout<<3<<endl; return 0; } 还行,不累对吧。但是如果我让你输出1-10000呢?够呛!!!那么我们就需要用到一个新的函数——for!!!让我们先来看看代码。 #include