跳到内容

neuroai

  • Home
  • All Courses
  • 科研研学
  • 更新日志
  • 点名系统
  • Log In
  • About
neuroai

The Do/While

  1. C++程序设计
  2. 第四章 循环语句
  3. The Do/While

do {
  // code block to be executed
}
while (condition);

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#include <iostream>
using namespace std;
int main(){
     int i =0;
     do{
         cout << i <<"\n";
         i++; 
     }while(i <5); 
return 0;
}

edit & run

Previous 主题
Back to 课
Next 主题

© 2026 neuroai Kadence WP 制作的 WordPress 主题

  • Home
  • All Courses
  • 科研研学
  • 更新日志
  • 点名系统
  • Log In
  • About