I need to find out how to output all the word that contain "a"
. I have a string
with all the months and want to output the ones that contain "a"
to console.
Here´s what i have so far
string[] Månedsdage = {
"Januar", "Februar", "Marts",
"April", "Maj", "Juni",
"juli", "August", "September",
"Oktober", "November", "December",
"Bichat" };
for (int i = 0; i < Månedsdage.Length; i++)
{
for (int j = 0; j < Månedsdage[i].Length; j++)
{
if (Månedsdage[i].Substring(j,1) == "a")
{
Console.WriteLine("Alle måneder med A: ");
Console.WriteLine(Månedsdage[j]);
Console.ReadLine();
}
}
}