**how to draw a line in c program given the slope and intercept of the line** |
+0 forum
6 | ||

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 [CODE]for (int i=0;i<n;i++) for (int j=0;j<n;j++) m[i]=((lnnum[j]-lnnum[j+1])/(lnt[j]-lnt[j+1])); j=j+2;[/CODE] … |
+0 forum
1 |

The End.