主题:[讨论]此程序运行不了,谁能改下?
#include "conio.h"
#include "math.h"
#include "graphics.h"
int main()
{
int x=0;
int y=239;
int i,h;
float m;
int driver,mode;
driver=VGA;
mode=VGAHI;
initgraph(&driver,&mode,"");
setbkcolor(9);
setcolor(BLUE);
line(317,0,317,479);
line(0,239,639,239);
for(int j=0;j<640;j++)
{
m=sin(j/50); /**************/
h=y-(int)(m*100);
putpixel(x+j,h,RED);
delay(1000);
}
getch();
closegraph();
return 0;
}
#include "math.h"
#include "graphics.h"
int main()
{
int x=0;
int y=239;
int i,h;
float m;
int driver,mode;
driver=VGA;
mode=VGAHI;
initgraph(&driver,&mode,"");
setbkcolor(9);
setcolor(BLUE);
line(317,0,317,479);
line(0,239,639,239);
for(int j=0;j<640;j++)
{
m=sin(j/50); /**************/
h=y-(int)(m*100);
putpixel(x+j,h,RED);
delay(1000);
}
getch();
closegraph();
return 0;
}