……

int i;
while(cin>>i)
{
cout<<i<<",";
}

输入的i不是整数时会退出循环

posted on 2017-12-09 09:49  兔子子子  阅读(302)  评论(0)    收藏  举报