++++++++++++++++++++++++++++++++++++++++++++
#include <graphics.h>
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>
int main(void)
{
/* request auto detection */
int gdriver = DETECT, gmode, errorcode;
int xmax, ymax,a,b,c;
/* initialize graphics and local variables */
initgraph(&gdriver, &gmode, "");
/* read result of initialization */
errorcode = graphresult();
/* an error occurred */
if (errorcode != grOk)
{
printf("Graphics error: %s\n",
grapherrormsg(errorcode));
printf("Press any key to halt:");
getch();
exit(1);
}
setcolor(getmaxcolor());
xmax = getmaxx();
ymax = getmaxy();
/* draw a diagonal line */
setcolor(2);
for(a=0;a=a+20;a==640)
{
line(a, 0, a, 480);
line(0, a, 640, a);
}
setcolor(14);
line(300,0,300,480);
line(0,240,640,240);
/* clean up */
//-0.3+tan(3x)
//1+sin(x)
//(-1+sin(3x))*1.5
//(-1+sin(9x))/3
//y=0
getch();
closegraph();
return 0;
}
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++