#include<graphics.h> #include<stdio.h> #include<math.h> #include<conio.h> #define pi 3.1415 int main (void) { int gdriver=DETECT,gmode,errorcode; int x,y, pcolor; double angle,sinofA; initgraph(&gdriver,&gmode,"..//bgi"); setcolor(6); line(0,100,200,100); for(x=0;x<200;x++) { angle=((double)x/200)*(2*pi); sinofA=sin(angle); y=100+100*sinofA; putpixel(x,y,9); } getch(); closegraph(); return 0; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)