I would be thankful if someone help me to resolve some task.
I need to create several variables using cycle "for".
I ask users how many numbers will they input, and declare it like variable "countVariables".
Next step, using cycle "for" I want to create new variables using counter cycle`s "for".
For example, name of created var must be like "num1", "num2", "num3" etc. I try do it using a code below.
I understand, that it isn't good solution, but I need to resolve task just using this way.
Console.WriteLine("Input count of numbers: ");
ushort.TryParse(Console.ReadLine(), out ushort countVariables);
for (int i = 1; i <= countVariables; i++)
{
string tmp = "num" + i;
int tmp.name = Console.ReadLine();
}