+ 1
How do i accept user input in a C# array?
Hello! It's me again. This time i would like to know how can i let the user input numbers of his choice in a C# array or list and then use the numbers that he gave me to maybe add them up for example. Thank you !
3 Réponses
0
Oh sorry i forgot to mention. It is an "int"
0
for(int i = 0; i < yourArray.lentgh; i++)
{
yourArray[i] = Convert.ToInt32(Console.ReadLine());
}
that should do it
0
thanks!