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

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

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

原文地址:https://www.cnblogs.com/zhangshuyao/p/8010615.html