0_0_31907815_28010.cpp: In function 'int main()':
0_0_31907815_28010.cpp:3:71: error: expected '}' at end of input
using namespace std;int main(){ int n,sum; int flag; cin>>n; getchar(); //消除换行符\n对cin.getline的影响 while(n--){ char ch[51]; cin.getline(ch,51); flag=0; sum=0; int ch_len=strlen(ch); if(!(ch[0]=='_'||(ch[0]>='a'&&ch[0]<='z')||(ch[0]>='A'&&ch[0]<='Z'))){ cout<<"no"<<endl; continue; } for(int i=0;i<ch_len;i++) if(ch[i]=='_'||(ch[i]>='a'&&ch[i]<='z')||(ch[i]>='A'&&ch[i]<='Z')||(ch[i]<='9'&&ch[i]>='0')) sum++; if(sum==ch_len) cout<<"yes"<<endl; else cout<<"no"<<endl; } return 0;}
^
|