C++中for循环语句

277 阅读1分钟
#include<iostream>
using namespace std;

/*
for循环语句
作用:满足循环条件执行循环语句
语法:for(起始表达式;条件表达式;末尾循环体){循环语句;}
*/

int main(){
    
    //for循环打印0-9数字
    for(int i = 0; i < 10; i++)
    {
        cout << i << endl;
    }
    
    system("pause");
    return 0;
}