I do not know if I should use a 2D or just two seperate arrays to make this easier.

I have two arrays. One is just an array like {1,2,3,4...n} and the other has values that correspond to those and make pairs.

I want to create an array that stores the slopes of the points.
m[n/2] would have m[0] the slope from the first two points and m[1] has slopes from point 2-3 and so on. Basically making segments and taking the slopes of those segments.

I have tried a few things

for (int i=0;i<n;i++)
			for (int j=0;j<n;j++)

This one of the closest. I get the correct values with every other value in m

for (int i=0;i<n;i++)
for (int i=0, a=0;i<n;i++, a=a+2)