Advertisement
TeMePyT

Untitled

May 22nd, 2018
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace _13.Vowel_or_Digit
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13.  
  14. char a = Convert.ToChar(Console.ReadLine());
  15.  
  16. char[] vowelList = { 'a', 'e', 'i', 'o', 'u' };
  17. foreach (char vowel in vowelList)
  18. {
  19. if (vowel == a)
  20. {
  21. Console.WriteLine("vowel");
  22. return;
  23. }
  24. }
  25. if (char.IsNumber(a))
  26. {
  27. Console.WriteLine("digit");
  28. }
  29. else
  30. {
  31. Console.WriteLine("other");
  32. }
  33. }
  34. }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement