Description: This program creates a graph for tan x.
Primary Inputs: ——
Primary Output: tan x Graph
Platform Used: Turbo C++ version 3.0, Borland International Inc.
void main() for(x=0;x<720;x++)
{
line(0,200,640,200);
y=200+50*tan(x*3.14/180);
putpixel(x,y,RED);
delay(50);
}
getche();
}#include
#include
#include
#include
{
int gd=DETECT,gm;
int x,y;
initgraph(&gd,&gm,"c:\\tc\\bgi");