高手求助!!知道c语言程序,怎么画流程图?
我找到了源程序,但是不会画流程图哪位大侠伸出援手啊~~~
方法1
#include<graphics.h>
#include<dos.h>
#define g 10
main()
{int x=320,y,t;
int gdriver=DETECT,gmode;
initgraph(&gdriver,&gmode,"");
cleardevice();
setcolor(4);
do{
for(t=0;t<10;t++)
{y=0.5*g*t*t;
circle(x,y,20);
delay(40000);
cleardevice();
}
for(t=0;t<10;t++)
{y=405-(90*t-0.5*g*t*t);
circle(x,y,20);
delay(40000);
cleardevice();
}
}while(!kbhit());
closegraph();
}
方法2
#include<graphics.h>
#include<dos.h>
#define g 10
main()
{int x=320,y,t;
int size;
int gdriver=DETECT,gmode;
void *buffer;
initgraph(&gdriver,&gmode,"");
cleardevice();
circle(320,10,10);
size=imagesize(310,0,330,20);
buffer=malloc(size);
getimage(310,0,330,20,buffer);
cleardevice();
do{
for(t=0;t<10;t++)
{y=0.5*g*t*t;
putimage(x,y,buffer,COPY_PUT);
delay(40000);
cleardevice();
}
for(t=0;t<10;t++)
{y=405-(90*t-0.5*g*t*t);
putimage(x,y,buffer,COPY_PUT);
delay(40000);
cleardevice();
}
}while(!kbhit());
closegraph();
}