Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq;
- namespace _02._Vowels_Count
- {
- class Program
- {
- static void Main(string[] args)
- {
- VowelsCount();
- }
- static void VowelsCount()
- {
- string command = Console.ReadLine().ToLower();
- var letters = new string[] { "a", "e", "i", "o", "u" };
- int count = 0;
- for (int i = 0; i < command.Length; i++)
- {
- if (command.Contains(letters[i]))
- {
- count++;
- }
- }
- Console.WriteLine(count);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement