Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace VowelsCount
- {
- class Program
- {
- static void Main(string[] args)
- {
- string input = Console.ReadLine().ToLower();
- int vowels = 0;
- Console.WriteLine(PrintNumOfVowel(input, vowels));
- }
- static int PrintNumOfVowel(string input,int vowels)
- {
- for (int i = 0; i < input.Length; i++)
- {
- int current = input[i];
- if (current == 97 || current == 101 || current == 105 || current == 111 || current == 117 || current == 121)
- {
- vowels++;
- }
- }
- return vowels;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement