Advertisement
Aminpro

[ECP 1016]Switch program 2

Jun 24th, 2012
296
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.84 KB | None | 0 0
  1. //https://www.facebook.com/AminproPastebin
  2.  
  3. #include <stdio.h>
  4.  
  5.  
  6. int main (void)
  7. {
  8.    
  9.     char a;
  10.     printf("Enter a letter: ");
  11.     scanf("%s", &a);
  12.    
  13.     switch(a){
  14.               case('a'):
  15.                       printf("It is a vowel");
  16.                      
  17.               case('e'):
  18.                       printf("It is a vowel");
  19.                      
  20.               case('i'):
  21.                       printf("It is a vowel");
  22.                      
  23.               case('o'):
  24.                       printf("It is a vowel");
  25.                      
  26.               case('u'):
  27.                       printf("It is a vowel");
  28.                      
  29.               default:
  30.                       printf("it is not a vowel");
  31.               break;
  32.              
  33.               }
  34.     getchar();
  35.     return(0);
  36.    
  37.    
  38.    
  39.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement