Advertisement
Guest User

Untitled

a guest
Jul 18th, 2018
910
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.27 KB | None | 0 0
  1. var vocales = new[] { 'A', 'E', 'I', 'O', 'U' };
  2.  
  3. Console.WriteLine("Introduce un texto: ");
  4. var text = Console.ReadLine().ToUpper();
  5.  
  6. foreach (var v in vocales)
  7. {
  8.     var matches = text.Count(x => x == v);
  9.     Console.WriteLine($"Existen {matches} vocales {v}");
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement