NOTE: I have figured out that this only affects .NET fiddle if you are using .NET 6. If you aren't using .NET 6 it works fine.
Whenever I use the Console.WriteLine() function on .NET fiddle, it doesn't let me interact with the console. I'm new at coding and .NET fiddle, so it might be a simple fix. I just hope you can figure it out
I've tried just having the Console.WriteLine. I've triple checked I wrote it right. I rewrote the Convert.ToInt32 several times. I looked up to see if anyone else had this problem. I even checked if Console.WriteLine being under the list maker was the problem, it wasn't.
Here is the code:
using System;
using System.Collections.Generic;
public class Program
{
public static void Main()
{
List<string> shoppingList = new List<string>();
Console.WriteLine("How many items on the list?");
int listLength = Convert.ToInt32( Console.ReadLine() );
for(var i = 0; i < 4; i++) {
shoppingList.Add(Console.ReadLine());
}
for(var i = 0; i < shoppingList.Count; i++) {
Console.WriteLine(shoppingList[i]);
}
}
}