vertical axis on graph

Hi all this is my code, i am able to get the horizotal axis correctly, but i am unable to get the horizontal axis correct. i need some help plz.
this is how the vertical axis is suppose to look like this:
http://i109.photobucket.com/albums/n79/johnz13/graph.jpg

#include <iostream>
#include <iomanip>
#include <fstream>
#include <cmath>
using namespace std;

const double pi = 3.141592654;

void graph1(int = 21, int = 76);

int main ()
{
ofstream outputFile;
outputFile.open("prog2_.txt"); //outputfile

int choice, choice1;
do
{
cout<<endl<<" Maths function plotter"; //Heading to program
cout<<endl<<"---------------------------------------";
cout<<endl<<"1. Plot function 1 3.5*sin(2*pi*t/8)\n"; //choice for plotting function 1
cout<<"2. Plot function 2 sqrt(t)\n"; //choice for plotting function 2
cout<<"3. Plot function 3 (At^2+Bt+C)/(t^2+1)\n"; //choice for plotting function 3
cout<<"4. Quit Program\n"<<endl; //choice for quiting program
cout<<"Make A Selection From The Menu: "; //user enters selection
cin>>choice;

while (choice < 1 || choice > 4); // validate the menu
char xy [76][76];


if (choice==1) //Input selection made by user

char xy [76][76];
int k,m;

//y=k/5;
//x=m/5;
//y=pow(x, 2.0);
//y=x*x;
//k=y*5;

for (k=0; k<76;k++)
for (m=0; m<76;m++)
xy[k][m]='.';

for (m=0;m<76;m++)
{
k =17.5*sin(2.0*pi*m/40.0);
/*y=k/5;
x=m/5;
y=pow(x, 2.0);
y=x*x;
k=y*5; //m*m;*/
if (k<21)
xy[m][k] = 'O';
}
cout<<" Maths Function Plotter"<<endl;
cout<<" --------------------------------"<<endl;
//system("pause");
//system("cls");
for (k=21; k>=0;k--)
{
cout << k << " ";
for (m=0;m<76;m++)
cout << xy[m][k];
cout << endl;
}

cout<<""<<" 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15"<<endl;
system("pause");
system("cls");


if (choice==2)
{
cout<<"number 2.\n"<<endl;
}

if (choice==3)
{
cout<<"hello.\n" <<endl;
}

if(choice==4) //if user choice is 4
{
cout<<"Time to say good bye, THE END. "<<endl;
cout<< "Now writing information to the file.\n"; //writes information to the output file
outputFile<< " Student name : "<<endl; //information writen to file
outputFile<< " Student ID : " <<endl;

outputFile.close();
cout<<"Done.\n";
}
}
while (choice!=4);

return 0;
}

thanks
please edit your post and put [ code ] (without spaces) before and [/code] behind your code.

Thanks, Imi
Topic archived. No new replies allowed.