This might be an easy one, but as a beginner I'm currently stuck. I tried the tempArray[i] = inputTemp; but it didn't seem to store the value properly when printing the list. Any ideas?
foreach (int i in tempArray)
{
Console.WriteLine("Enter a value");
double inputTemp = Convert.ToDouble(Console.ReadLine());
tempArray[i] = inputTemp;
}
// Print out the array
foreach (double i in tempArray)
{
Console.WriteLine(i);
}