A piece of the program, which should build a graph by points. N - number of nodes. a, b - start and end point. h is a step. I found a problem, so I reduced the code to a training one. The bottom line is that when N> = 100, not N elements are entered into the array, but N + 1, and because of this, an error occurs. What's the matter?
double a = -5, b = 5, h; double N = 50; double *m; int i = 0; h = (b - a)/N; m = new double[N]; for (double x = a; x < b; x += h) { m[i] = i; cout << i << " " << m[i] << endl; i++; } cout << "и i конеч = " << i << endl; N = 50
N = 100 or more

