Hello,
In the following code below i have 1 method that fills a array with 11 random value's.(wich works as intended).
My question is how do i take each generated random value created in the array, and perform a calculation with each of those values? (preffered in a new method).
const byte AantalElem = 11;
int[] ArrayElem = new int[AantalElem];
public void FillArrayRandom(int[] ArrayElem)
{
Random RndInt = new Random();
for (int i = 0; i < ArrayElem.Length; i++)
{
ArrayElem[i] = RndInt.Next(0, 9999);
}
}/*FillArrayRandom*/
And is it possible to "call" upon those calculated value's in a new array aswell?
ArrayElem[i] = (21 * ArrayElem[i]) / MaxHoogte;
But i have no idea how to insert this, if i do my random generated numbers are between 0 and 10. (not even sure the line above is even correct).
Any help appreciated.
Regards.