Joke Collection Website - Bulletin headlines - C how to draw coordinates

C how to draw coordinates

Because you don't have a score, I won't write a program, so I'll just tell you the direction.

If it's a painting in C language, the header file for drawing straight lines is contained in #include"graphics.h "

Now, let's define four variables X1, Y1, X2 and Y2;

I now assume that your a b arrays are equal and the length is known as length

, so I use the for loop

for(int i=; i< length-1; i++)

{

x1=a[i]; y1=b[i];

x2=a[i+1]; y2=b[i+1];

line(x1,y1,x2,y2);

}

Finish drawing

I hope the above will help you.