My goal is, at every new input to the question which i marked, the array gets a new input. For example:
double[] Test = new double[10];
"give input" |
int input = int.Parse(Console.ReadLine()) |
Test[0] = input |
Again to "give input". just that circle and with every input the "Test [HERE]" gets there a new input. (Like if u would do that manually)
sry for my bad english. english insn't my native language.
static void Main(string[] args)
{
Mittelwert();
}
public static void Mittelwert()
{
double[] Test = new double[10];
for (int i = 1; i < 11; i++)
{
Console.WriteLine("Geben Sie ihren " + i + " Wert ein");
int input = int.Parse(Console.ReadLine());
Test[+1] = input;
}
var Average = Enumerable.Average(Test);
Console.WriteLine("Der Durchschnitt ist " + Average);
}
```