C语言高手来给这个程序加个注释,最好每行都有!

来源:百度知道 编辑:UC知道 时间:2024/05/18 14:01:29
C语言高手来给这个程序加个注释,最好每行都有!
#include"graphics.h"
#define PI 3.1416
#include"math.h"
#include"dos.h"
main()
{
int x0=320,y0=240,r0=150;
void init_sceen();
void sec();
init_sceen(x0,y0,r0);
sec();
closegraph();
}
void init_sceen(int x0,int y0,int r0)/********************************************/
{
int i,x,y,graphdriver,graphmode;
char s[10];
float alpha,a0=90;

graphdriver=DETECT;
initgraph(&graphdriver,&graphmode,"c:\\turboc2");
setbkcolor(3);
setcolor(2);
circle(x0,y0,r0);
circle(x0,y0,r0+30);
setfillstyle(SOLID_FILL,10);
floodfill(x0-r0-10,y0,2);
/*please input the time*/
for(i=12;i>=1;i--)
{
alpha=(a0+30*(11-i)*PI/180);
x=x0+cos(alpha)*r0-16;
y=y0-sin(alpha)*r0;
sprintf(s,"%2d",i);
setcolor(4);
settextstyle(0,0,2);
outtextxy(x,y,s);
}
/

其实这个程序不是很难,如果你真的想做编程有很多时候你必须让你的毅力先过关,如果你自己把这个程序读懂,相信你会对c语言图形界面编程有一个比较深刻的认识.别人只能帮助你提供思路,打基础还是靠自己.

哥们儿,回答问题要花时间的,像你这种问题,10分?打发谁啊?

LZ太黑了

200分我做

才10分?