参考链接: C while和do ... while循环
#include<iostream>
using namespace std;
#include<Windows.h>
int main()
{
int i=10;
int sum = 0;
system("color A4");
do
{
sum = i;
i ;
cout << sum << "n";
} while (i>0);//i
cout << sum << "n";
return 0;
}
i大于0|| i ,可以无限递增,我也只是刚好看到,写了一个试试,如果你们有更好的,欢迎留言,一起交流!
转载于:https://www.cnblogs.com/maoye520/p/10996114.html