Guest User

Untitled

a guest
Feb 19th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. // ask a character and check for vowel or consonant
  2. #include<stdio.h>
  3. #include<conio.h>>
  4. void vow(char);
  5. int main()
  6. {
  7. char a;
  8. printf("Enter a character ");
  9. scanf("%c",&a);
  10. /* if (vow(a)==1)
  11. {
  12. printf("Vowel");
  13. }
  14. else
  15. {
  16. printf("Consonant");
  17. }
  18. */
  19. vow(a);
  20. }
  21.  
  22. void vow(char a)
  23. {
  24. int num=0;
  25. if (a=='A'||a=='E'||a=='I'||a=='O'||a=='U'||a=='a'||a=='e'||a=='i'||a=='o'||a=='u')
  26. {
  27. printf("Vowel");
  28. }
  29. else
  30. {
  31. printf("Consonant");
  32. }
  33. }
Add Comment
Please, Sign In to add comment