Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _02._Vowels_Count
- {
- class Program
- {
- static void Main(string[] args)
- {
- string singalString = Console.ReadLine().ToLower();
- double vowels = FinedVowels(singalString.Length, singalString);
- Console.WriteLine(vowels);
- }
- static double FinedVowels(double singalStringLength, string singalString)
- {
- double vowels = 0;
- for (int i=0; i< singalStringLength; i++)
- {
- char symbol = singalString[i];
- if(symbol=='a' || symbol == 'e' || symbol == 'u' ||
- symbol == 'o' || symbol == 'i')
- {
- vowels++;
- }
- }
- return vowels;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment