I'm currently doing a beginner's coding exercise, and have run into a problem. The program I made takes 5 numbers, turns them into an array, and displays the three smallest numbers on the console. I have the input separated into an array, and created a new variable containing the three smallest values, but I'm not sure how to display each number in the array on the console. I know that's a beginner question, but I've been coding less than a week. I tried searching StackOverflow and found a code to display each integer in a list, but am unsure what to change to display each value in an array.
bool isFive = new bool();
Console.WriteLine("Enter at least 5 numbers, separated by a comma.");
while (!isFive)
{
string text = Console.ReadLine();
string[] result = text.Split(',');
int[] resultInt = result.Select(s => int.Parse(s)).ToArray();
if (resultInt.Length < 5)
{
Console.WriteLine("Invalid list, retry.");
}
else
{
isFive = true;
var smallestThree = resultInt.OrderBy(x => x).Take(3);
????????????????
}
}