I'm having trouble trying to figure out how to create a Cartesian Graph for the formula y=x^2 so that it looks like the following.

------*

---*

--*

-*

*

*please disregard the -*

Current grid parameters:

20 X 20 array with step 1

I know I have to create a char[20][20] array and then somehow get a function to return x*x but I really cant picture it in my head on how to do this. Any help would be appreciated, because I'm lost.