Skip to content
September 26, 2007 / ranacse05

Fun with Turbo C

Here is a program which show sin,cos,tan graph . Just copy and past in .c or .cpp file and compile and see 🙂

* Fun with C. /
* Sin,cos,tan grapth in Turbo C. /
* Aughtor:Raquibul Islam /
* /
* /
* /
* /

#include “stdio.h”
#include “Math.h”
#include “graphics.h”

int main()
double i,cone,redian=22.0/(7.0*180.0);

int gdriver = DETECT, gmode, errorcode;
initgraph(&gdriver,&gmode,”f:\\tc\\bgi”);//Here is the path of the egevge file.

//—2 lines for axais.

putpixel(i,220-((sin(cone*redian))*50),2); //for sine
putpixel(i,220-((cos(cone*redian))*50),3); //for cos
putpixel(i,220-((tan(cone*redian))*50),5); //for tan
return 0;


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: