Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int i;
- if(strlen(S) <= 6 || strlen(S) >= 32)
- return 0;
- int maiuscula = 0, minuscula = 0, numero = 0;
- for(i = 0; i < strlen(S) - 1; i++) {
- if(islower(S[i]))
- maiuscula = 1;
- else if(isupper(S[i]))
- minuscula = 1;
- else if(isdigit(S[i]))
- numero = 1;
- else
- return 0;
- }
- return maiuscula * minuscula * numero;
- char S[40];
- while(fgets(S, 40, stdin) != EOF) {
- if(validade(S) == 1)
- printf("Senha valida.n");
- else
- printf("Senha invalida.n");
- }
- return 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement