#include<stdio.h>
#include<graphics.h>
#include<math.h>
main()
{
int gd=DETECT,gm;
double x,y;
registerbgidriver(EGAVGA_driver);
initgraph(&gd,&gm,"");
for(x=0.0;;x=x+0.1)
{ y=-sin(x/20);
y=200+y*50;
if(x>640.0) break;
putpixel(x,y,15);
}
getch();
closegraph();
}
[此贴子已经被作者于2006-11-23 21:15:00编辑过]