#include <iostream>
#include <cctype>
using namespace std;
int main() {
int n;
cin>>n;
getchar(); //在接收完n后要getchar()读取一下换行符才能用getline,否则换行符会被读进getline中
string s;
for(int i=0;i<n;i++){
int digit=0,letter=0,flag=1;
getline(cin, s); //非空字符串,每个字符串以回车结束,但是字符串里面可能会有空格,所以不能直接用cin,要用getline接收一行字符
if(s.length()<6){cout<<"Your password is tai duan le."<<endl;continue;}
for(int j=0;j<s.length();j++){
if(isalpha(s[j]))letter++;
else if(isdigit(s[j]))digit++;
else if(s[j]!='.'){
flag=0;
break;
}
}
if(flag==0){cout<<"Your password is tai luan le.";}
else if(digit==0){cout<<"Your password needs shu zi.";}
else if(letter==0){cout<<"Your password needs zi mu.";}
else cout<<"Your password is wan mei.";
cout<<endl;
}
system("pause");
return 0;
}
05-24
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交