string[] seasons = {"Winter", "Spring", "Summer", "Fall"};
foreach (string i in seasons)
{
Console.WriteLine(i);
}
Volodymyr H.
asked 12/09/22Create a 4-element array to store the names of 4 seasons. Use a foreach loop to display the name of each season. It is in C#
string[] seasons = {"Winter", "Spring", "Summer", "Fall"};
foreach (string i in seasons)
{
Console.WriteLine(i);
}
Get a free answer to a quick problem.
Most questions answered within 4 hours.
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.