using namespace std;
int main()
{
int ival;
while (! (cin >>ival).eof()){ // 输入 'a' 为什么无限循环???
if (cin.fail()) {
cerr << "bad data, try again"<<endl;
//cin.clear();
continue;
}
}
}
using namespace std;
int main()
{
int ival;
while (! (cin >>ival).eof()){ // 输入 'a' 为什么无限循环???
if (cin.fail()) {
cerr << "bad data, try again"<<endl;
//cin.clear();
continue;
}
}
}