Advertisement
martinvalchev

Vowel_or_Digit

Jan 31st, 2018
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.02 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Vowel_or_Digit
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.            
  10.            
  11.                 char input = char.Parse(Console.ReadLine());
  12.                 switch (input)
  13.                 {
  14.                     case 'a':
  15.                     case 'e':
  16.                     case 'i':
  17.                     case 'o':
  18.                     case 'u':
  19.                     case 'y':
  20.                         Console.WriteLine("vowel");
  21.                         break;
  22.                 case '1':
  23.                 case '2':
  24.                 case '3':
  25.                 case '4':
  26.                 case '5':
  27.                 case '6':
  28.                 case '7':
  29.                 case '8':
  30.                 case '9':
  31.                 case '0':
  32.                     Console.WriteLine("digit");
  33.                     break;
  34.                 default:
  35.                         Console.WriteLine("other");
  36.                         break;
  37.                 }
  38.             }
  39.         }
  40.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement