Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<string.h>
- int main()
- {
- int i, len, count1 = 0, count2 = 0, count3 = 0;
- char password[10000];
- gets(password);
- len = strlen(password);
- if(len >= 8)
- {
- //null character soho total 9 ta character password e thakbe
- for(i = 0; i < len; i++)
- {
- if(password[i] >= 'a' && password[i] <= 'z')
- count1++;
- else if(password[i] >= 'A' && password[i] <= 'Z')
- count2++;
- else
- count3++;
- //capital and small letter na hole seta special character,oitar jonnoi count3 use korsi
- }
- if(count1 != 0 && count2 != 0 && count3 != 0)
- {
- printf("Valid Password!\n");
- }
- else
- {
- printf("Invalid Password!\n");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement