Testing if a character is in a word
1 Console.WriteLine("please enter a word:");
2 string word = Console.ReadLine();
3 string vowels = "aeiou";
4
5 foreach(char c in word)
6 {
7 if(vowels.Contains(c.ToString()))
8 {
9 Console.WriteLine("Vowel found: "+c);
10 }
11 }
12
13 Console.ReadLine();