tan x Graph

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.
 

#include
#include
#include
#include

void main()
{
int gd=DETECT,gm;
int x,y;
initgraph(&gd,&gm,"c:\\tc\\bgi");

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(); }

 

Rate this post

Leave a Reply