Advertisement
VitorMDias

uri1551

Sep 8th, 2015
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.66 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4. #include <math.h>
  5.  
  6.  
  7.  
  8. int main ()
  9. {
  10.     char frase[1000] ;
  11.     int aux , n , i, j;
  12.     int soma;
  13.     scanf("%d" , &n);
  14.     n = n+1;
  15.     while(n--)
  16.     {
  17.         soma = 0;
  18.         char alfa[] = "abcdefghijklmnopqrstuvwxyz";
  19.         fgets(frase,sizeof(frase),stdin);
  20.         aux = strlen(frase);
  21.         for(i = 0 ; i < aux ; i++)
  22.         {
  23.             for(j=0;j < 26;j++)
  24.                 if(frase[i] == alfa[j])
  25.                 {
  26.                     soma++;
  27.                     alfa[j] = '\0';
  28.                 }
  29.         }
  30.         if(soma == 26)
  31.             printf("frase completa\n");
  32.         else if(soma > 12)
  33.             printf("frase quase completa\n");
  34.         else if(soma < 13 && soma > 0)
  35.             printf("frase mal elaborada\n");
  36.     }
  37.     return 0;
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement