我自己感觉我的代码没什么问题,但就是答案错误,大家伙帮我看看
下面是代码
#include<stdio.h>
#include<string.h>
int main()
{
int N;
scanf("%d",&N);
while(N>0)
{
char ch[81];
gets(ch);
int a=0,b=0,t=0,l=strlen(ch);
N--;
if(l<6)
{
printf("Your password is tai duan le.\n");
continue;
}
for(int i=0;i<l;i++)
{
if((ch[i]>'9'||ch[i]<'0')&&(ch[i]<'a'||ch[i]>'z')&&(ch[i]<'A'||ch[i]>'Z')&&(ch[i]!='.'))
{
t=1;
break;
}
}
if(t==1)
{
printf("Your password is tai luan le.\n");
continue;
}
for(int i=0;i<l;i++)
{
if(ch[i]>='0'&&ch[i]<='9')
{
a=1;
break;
}
}
for(int i=0;i<l;i++)
{
if((ch[i]>='a'&&ch[i]<='z')||(ch[i]>='A'&&ch[i]<='Z'))
{
b=1;
break;
}
}
if(a==1&&b==1)
printf("Your password is wan mei.\n");
if(a==1&&b==0)
printf("Your password needs zi mu.\n");
if(a==0&&b==1)
printf("Your password needs shu zi.\n");
}
return 0;
}