Advertisement
bacco

Vowel or Digit

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