Yes, as the previous poster points out, your y gets big quick, so it displays better on the screen if the y is horizontal. Here is some code to display it in several pages. You could also write the graph to a file.
Code:
#include <iostream.h>
#include <conio.h>
int main()
{
int i = 1;
int x = 0;
int y = 100;
int k = 0;
char a;
const screen_length = 79;
const screen_height = 25;
//const screen_height = 24;
const minx = 10;
const maxx = -10;
const miny = -5;
const maxy = 100;
int xstep = maxx - minx/79-1;
//int xstep= screen_height/screen_length;
while (i<=maxy)
{
//x = minx;
while(k<screen_length)
{
if (y == x * x)
cout<<'*';
else if (k == 0)
cout<<'|';
//else if (i == 24)
else if (i % screen_height == 0)
cout<<'_';
else
cout<<' ';
x++;
k++;
}
if (i % screen_height == 0)
getch();
cout<<endl;
k = 0;
i++;
x = 0;
y--;
}
getch();
}