fork download
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5. char alphabet;
  6. //printf("Enter the alphabet:");
  7. scanf("%c",&alphabet);
  8. switch(alphabet)
  9. {
  10. case 'a':
  11. case 'A':
  12. printf("%c is a vowel",alphabet);
  13. break;
  14.  
  15. case 'e':
  16. case 'E':
  17. printf("%c is a vowel",alphabet);
  18. break;
  19.  
  20. case 'i':
  21. case 'I':
  22. printf("%c is a vowel",alphabet);
  23. break;
  24.  
  25. case 'o':
  26. case 'O':
  27. printf("%c is a vowel",alphabet);
  28. break;
  29.  
  30. case 'u':
  31. case 'U':
  32. printf("%c is a vowel",alphabet);
  33. break;
  34. default:
  35. printf("%c is not a vowel",alphabet);
  36.  
  37. }
  38.  
  39. return 0;
  40. }
  41.  
Success #stdin #stdout 0s 2252KB
stdin
u
stdout
u is a vowel