Advertisement
Guest User

Vowel or Digit

a guest
Sep 29th, 2016
340
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. using System;
  2.  
  3. class VowelOrDigit
  4. {
  5. static void Main()
  6. {
  7. char symbol = char.Parse(Console.ReadLine());
  8.  
  9. if (symbol == 'a' || symbol == 'e' || symbol == 'i' || symbol == 'o' || symbol == 'u')
  10. {
  11. Console.WriteLine("vowel");
  12. }
  13. else if (symbol >= 48 && symbol <= 57)
  14. {
  15. Console.WriteLine("digit");
  16. }
  17. else
  18. {
  19. Console.WriteLine("other");
  20. }
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement