Untitled
1 month ago in Plain Text
void check(char a[])
{
char c;
int len,i,flag1=0,flag2=0,flag3=0,flag4=0;
len=strlen(a);
if(len<6)
flag1=1;
else
{
for(i=0;i<len;i++)
if((a[i]>=48&&a[i]<=58))
{
flag2=0;

break;
}
else
flag2=1;

for(i=0;i<len;i++)
if((a[i]>=65&&a[i]<=90))
{
flag3=0;

break;
}
else
flag3=1;

for(i=0;i<len;i++)
if(a[i]=='#'||a[i]=='$'||a[i]=='*'||a[i]=='&')
{
flag4=0;

break;
}
else
flag4=1;


}
if(flag1==1||flag2==1||flag3==1||flag4==1)
printf("\nWrong password\n");
else
printf("your password is successfully created\n");


return;
}

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51