for循环

for(初始化表达式;运行条件;变动表达式)

{

  循环语句;

}

 

 

 

 

例如:for(int i=0;i<=5;i++)

{

  std::cout<<i<<std::endl;

}

posted @ 2022-02-06 18:19  昊昊哥  阅读(16)  评论(0)    收藏  举报