hello guys this is my code:
double[] milad = new double[5];
for (int i = 0; i < milad.Length; i++)
milad[i] = double.Parse(Console.ReadLine());
but when I input a float number like 25.5 compiler error me "System.FormatException: 'Input string was not in a correct format" can somebody help me?
Your code runs without errors, it may be that your input is incorrect.
Do not use ','
instead of '.'
.
That's my Output:
Add your error in the comment below me, and I will give you suggestions.