#include <iostream>
int main()
{
int counter=0;
while(true)
{
counter++;
if(counter>10)
break;//break 和 continue 的区别 前者是跳出 后者是跳转到程序的开头
}
std::cout << " counter is " <<counter <<"/n";
return 0;
}
#include <iostream>
int main()
{
int counter=0;
while(true)
{
counter++;
if(counter>10)
break;//break 和 continue 的区别 前者是跳出 后者是跳转到程序的开头
}
std::cout << " counter is " <<counter <<"/n";
return 0;
}