1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
int main(int)
{
int x[] = {0,3, 6, 9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57,60};
int y[] = {5,7,11,14,11,10, 9,11, 9,10,10,7,11,10, 9, 12,14,12, 7, 8,15};
int a,b;
string line(80,'_');
string XValue = "X Value";
int bottom = 15;
gotoXY(27,20,"Y value");
for (a=0;a<7;a++)
{
gotoXY(1,7+a);
cout << XValue[a];
}
for ( a = 0; a < 20; a++)
{
int X=y[a];
do
{
gotoXY(3+x[a],X,"\xDB");
X++;
} while (X != bottom);
gotoXY(3+x[a],16);
cout << a+1;
gotoXY(3+x[a],18);
cout << y[a];
}
gotoXY(0,15,line);
gotoXY(0,25);
WaitKey();
return 0;
}
|