#include<iostream> using namespace std; int main() { char a; while (cin >> a) { if (a>57 || a<48) { try { throw 1; } catch (int) { cout<<"只能输入整数"<<endl; } } } return 0; }