How do I use a double in a console app to handle decimal places I tryed changing the int to double?
double[] myArrai1 = new double[3];
for (double myDouble = 0; myDouble < myArrai1.Length; myDouble++ )
Console.WriteLine(myArrai1[myDouble]);
I get the error cant convert double type to int (obviously) but not sure how I can manage an array in c console app?
The index to the array needs to be an int, not a double. I also changed the variable name to properly reflect its meaning.
The other option would be to use a foreach loop: