VelizarAvramov

13. Vowel or Digit

Nov 15th, 2018
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.79 KB | None | 0 0
  1. using System;
  2. using System.Numerics;
  3.  
  4. namespace Demo
  5. {
  6.     class Program
  7.     {
  8.         static void Main(string[] args)
  9.         {
  10.             try
  11.             {
  12.                 char input = char.Parse(Console.ReadLine());
  13.                 if (input >= 48 && input <= 57)
  14.                 {
  15.                     Console.WriteLine("digit");
  16.                 }
  17.                 else if (input == 'a' || input == 'o' || input == 'u' || input == 'y' || input == 'i' || input == 'e')
  18.                 {
  19.                     Console.WriteLine("vowel");
  20.                 }
  21.                 else
  22.                 {
  23.                     Console.WriteLine("other");              
  24.                 }
  25.             }
  26.             catch (Exception)
  27.             {
  28.                
  29.             }
  30.         }
  31.     }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment