# include & ltstdio.h & gt
# include & ltmath.h & gt
# include & ltstdlib.h & gt
# Define Line 25
# Define the 84th column
Char table [row] [column];
void initTable()
{
for(int I = 0; I< platoon; i++)
{
for(int j = 0; j & ltCOLj++)
{
Table [I] [J] = "";
}
}
}
int main(int argc,char*argv[])
{
//Take cos(x) as an example.
//Because the number of rows and columns is variable, the expected result is rounded down here.
//The abscissa position here is the 20th line.
//Draw the x and y coordinates first.
for(int row = 0; Row< row; row++)
{
table[row][0]= ' | ';
}
table[20][0]= '+';
for(int col = 1; col & ltCOLcol++)
{
Table [20][ Column] ='-';
}
Table [0] [0] ='';
table[20][COL- 1]= ' >;' ;
//Here, use X to calculate the value of cos, and use' *' to replace the characters at the corresponding coordinates;
for(int x = 0; x & ltCOL- 1; x++)
{
table[5 *(int)(cos(x))][x]= ' * ';
}
//The next step is to output line by line.
for(int I = 0; I< platoon; i++)
{
for(int j = 0; j & ltCOLj++)
{
printf("%c ",table[I][j]);
}
}
System ("suspended");
}