Plot coordinates program

Hey guys, I have written a program that converts from Cartesian to Polar coordinates and vice versa. Now I am told to draw a very simple graph (a vertical and a horizontal line) and plot the points. How can I go about achieving something like this?

Thank you.
If you're working with a reasonably standard terminal and nothing fancy, the output is going to be something that looks like this:


1
2
3
4
5
6
7
8
|       *
|                     *
|                           *
|                              *
|                                *
|                                 *
|                                 *
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


You output a bunch of lines, each line starting with | for the vertical axis, and a * on it somewhere for any plot points with that y-value.
Last edited on
Can I use some kind of a function or an external library which handles the plotting for me?
Yes. There are many external libraries available for C and C++.
Topic archived. No new replies allowed.