#include
using namespace std;
int main(void)
{
cout << "开始输入字符" << endl;
while(1)
{
char c;
c = getchar();
if( '\n' == c)
break;
if( (c <= 'z' && c >= 'a')|| (c >= '0' && c <= '9'))
{
putchar(c);
}
else
{
cout << "输入错误" << endl;
}
}
cout << "输入结束" << endl;
return 0;
}