Advertisement
michael_xgrind

Vogal ou Consoante?

Sep 5th, 2014
324
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.50 KB | None | 0 0
  1. #include "stdio.h"
  2. #include "stdlib.h"
  3.  
  4. main() {
  5.     char letra;
  6.  
  7.     printf("Digite uma letra: ");
  8.     scanf("%c", &letra);
  9.  
  10.     switch (letra) {
  11.         case 'a':
  12.         case 'A':
  13.         case 'e':
  14.         case 'E':
  15.         case 'i':
  16.         case 'I':
  17.         case 'o':
  18.         case 'O':
  19.         case 'u':
  20.         case 'U':
  21.             printf("\n\n%c eh vogal\n", letra);
  22.             break;
  23.         default:
  24.             printf("\n\n%c eh consoante\n", letra);
  25.  
  26.     }
  27.  
  28.     return 0;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement