number of vowels in a string

PHOTO EMBED

Sun Oct 12 2025 17:08:40 GMT+0000 (Coordinated Universal Time)

Saved by @final

using System;
class Program {
    static void Main() {
        Console.Write("Enter string: ");
        string str = Console.ReadLine();
        int count = str.Count(c => "aeiouAEIOU".Contains(c));
        Console.WriteLine("Vowels: " + count);
    }
}
content_copyCOPY