#include<iostream>
using namespace std;
int main()
{
int num = 0;
//与while循环区别,do while为先执行后判断
do {
cout << num << endl;
num++;
} while (num < 10);
system("pause");
return 0;
}
#include<iostream>
using namespace std;
int main()
{
int num = 0;
//与while循环区别,do while为先执行后判断
do {
cout << num << endl;
num++;
} while (num < 10);
system("pause");
return 0;
}
本文标题:14.do while循环
本文链接:https://www.haomeiwen.com/subject/gksawktx.html
网友评论