Chessmaster

Vowel or Digit

Jun 12th, 2018
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. using System;
  2.  
  3.  
  4. namespace Learning
  5. {
  6. class Program
  7. {
  8. static void Main()
  9. {
  10. try
  11. {
  12. string symbol = Console.ReadLine();
  13.  
  14. if (symbol == "a" || symbol == "e" || symbol == "i" || symbol == "o" || symbol == "u")
  15. {
  16. Console.WriteLine("vowel");
  17. return;
  18. }
  19. else
  20. {
  21. int digit = int.Parse(symbol);
  22. Console.WriteLine("digit");
  23. }
  24.  
  25. }
  26. catch (Exception)
  27. {
  28. Console.WriteLine("other");
  29. }
  30. }
  31.  
  32. }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment