21天学通c++之7.7 do....while 循环

#include <iostream>
using namespace std;
int main()
{
 int counter;
 cout<<"how many hello?";
 cin>>counter;
 do
 {
 cout<<"hello\n";
 counter--;
 }while(counter>0);
 cout<<"counter is : "<<counter<<endl;
  return 0;
}
posted @ 2008-11-22 15:20  雨城  阅读(324)  评论(2编辑  收藏  举报