21天学通c++之7.2---while 循环
#include <iostream>
using namespace std;
int main(){
int counter=0;
while(counter<5)
{
counter++;
cout<<"counter is "<<counter<<endl;
}
cout<<"complete.counter is "<<counter<<endl;
return 0;
}
using namespace std;
int main(){
int counter=0;
while(counter<5)
{
counter++;
cout<<"counter is "<<counter<<endl;
}
cout<<"complete.counter is "<<counter<<endl;
return 0;
}