nikolas_serafini

Lista 2 - Exercício 10

May 24th, 2013
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.55 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main()
  5. {
  6.     char a,b;
  7.    
  8.     printf("Entre com as iniciais de seu nome e sobrenome :\n"); scanf("%c %c",&a,&b);
  9.  
  10.     if (((a=='a')||(a=='e')||(a=='i')||(a=='o')||(a=='u'))&&((b=='a')||(b=='e')||(b=='i')||(b=='o')||(b=='u')))
  11.     {
  12.         printf("Duas vogais!\n");
  13.         return 0;
  14.     }
  15.     else if (((a!='a')&&(a!='e')&&(a!='i')&&(a!='o')&&(a!='u'))&&((b!='a')&&(b!='e')&&(b!='i')&&(b!='o')&&(b!='u')))
  16.     {
  17.         printf("Duas consoantes!\n");
  18.         return 0;
  19.     }
  20.     else
  21.     {
  22.         printf("Uma vogal e uma consoante!\n");
  23.         return 0;
  24.     }
  25.    
  26.  
  27. }
Advertisement
Add Comment
Please, Sign In to add comment