032.程序流程结构-循环结构-do-while语句
时间:2021-09-05 20:46:11
收藏:0
阅读:29
#include <iostream> using namespace std; int main() { //do...while语句 //在屏幕中输出0到9这10个数字 int num = 0; do { cout << num << endl; num++; } while (num < 10); //do...while和while循环区别,do...while会先执行一次循环语句,while条件为0不执行 system("pause"); return 0; }
原文:https://www.cnblogs.com/ceovs/p/15225764.html
评论(0)