luishenriique

Verificar Senha

Apr 6th, 2012
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.34 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <conio.h>
  3. #include <string.h>
  4.  
  5. int main(){
  6.     char SENHA[6];
  7.     printf("Informe sua senha: ");
  8.     gets(SENHA);
  9.     if(strlen(SENHA) != 5){
  10.         printf("A senha deve conter 5 digitos.\n");
  11.     }else{
  12.         if(strcmp(SENHA, "ABFGH")){
  13.             printf("Senha incorreta.\n");
  14.         }else{
  15.             printf("Senha ok.\n");
  16.         }
  17.     }
  18.     return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment