有个问提 关于C 语言的

来源:百度知道 编辑:UC知道 时间:2024/07/12 22:56:33
我想问下我最近无聊看了关于C语言的书 然后我按照书上说的编写了一段超简单的程序然后用 c语言编译器 保存在运行然后就弹出 程序的运行结果的下面的“Press any key to continue”表示按任意键退出DOS窗口。(什么也没发生啊)就这样弹出个窗口 我晕我是刚入门的 谁能告诉我 我要怎么样才能启动我的程序
#include<graphics.h>
#include<math.h>
#include<dos.h>
#define PI 3.1415926
#define mid_x 320
#define mid_y 240
int main()
{ int graphdriver=DETECT,graphmode;
int end_x,end_y;
struct time curtime;
float th_hour,th_min,th_sec;
initgraph(&graphdriver,&graphmode,"C:\\TC2");
setbkcolor(BLACK);
while(!kbhit(0))
{ setcolor(GREEN);
circle(mid_x,mid_y,180);
circle(mid_x,mid_y,150);
circle(mid_x,mid_y,1);
gettime(&curtime);
th_sec=(float)curtime.ti_sec*0.1047197551;
th_min=(float)curtime.ti_min*0.1047197551+th_sec/60.0;
th_hour=(float)curtime.ti_hour*0.5235987755+th_min/12.0;
end_x=mid_x+70*sin(th_hour);
end_y=mid_y-70*cos(th_hour);
setcolor(RED);
l

证明你的程序已经运行完啦
你想看什么结果可以在return 0;前用printf打印出来

最近无聊看了关于C语言的书 然后我按照书上说的编写了一段超简单的程序
然后是一大段程序,这个是亮点!!