Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class Program
- {
- static void Main(string[] args)
- {
- string vow = Console.ReadLine().ToLower();
- GetVowels(vow);
- }
- public static void GetVowels(string st)
- {
- int count = 0;
- for (int i = 0; i < st.Length; i++)
- {
- if(st[i]=='a'|| st[i]=='e'|| st[i]=='i' || st[i]=='o'|| st[i]=='u')
- {
- count++;
- }
- }
- Console.WriteLine(count);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement