PlamenMI81

13. Vowel or Digit

Oct 1st, 2017
139
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2.  
  3. namespace _13_Vowel_or_Digit
  4. {
  5.     internal class Program
  6.     {
  7.         private static void Main(string[] args)
  8.         {
  9.             string input = Console.ReadLine().ToLower();
  10.             bool isDigit = int.TryParse(input, out _);
  11.             if (isDigit)
  12.                 Console.WriteLine("digit");
  13.             else if (input == "a" || input == "o" || input == "u" || input == "e" || input == "i")
  14.                 Console.WriteLine("vowel");
  15.             else
  16.                 Console.WriteLine("other");
  17.         }
  18.     }
  19. }
RAW Paste Data