| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 565 人关注过本帖
标题:[求助]这个程序错在哪了?????
取消只看楼主 加入收藏
baiyang26
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2006-6-27
收藏
 问题点数:0 回复次数:2 
[求助]这个程序错在哪了?????

程序如下:

#include"graphics.h"

#include"math.h"

main()

{

int x,y,a,b,h,l,r,driver,mode;

float n=1;

driver=VGA,mode=VGAHI;

initgraph(&driver,&mode,"");

setcolor(GREEN);

setbkcolor(BLACK);

printf("please enter x,y,a,b,h,l,r:");

scanf("%d%d%d%d%d%d%d",&x,&y,&a,&b,&h,&l,&r);

setlinestyle(0,0,1);

rectangle(x-2*r,y-2*h,x,y);

rectangle(x-2*r,y-h,x,y);

line(x+a,y-2*h,x+a,y);

line(x+a,y,x+a+2*l+r,y);

line(x+a+2*l+r,y,x+a+2*l+r,y-h);

line(x+a,y-2*h,x+a+l,y-2*h);

line(x+a+l,y-2*h,x+a+l,y-h);

line(x+a+l,y-h,x+a+2*l+r,y-h);

rectangle(x-2*r,y+b,x,y+b+l);

line(x-2*r,y+b+l,x-2*r,y+b+2*l);

line(x,y+b+l,x,y+b+2*l);

arc(x-r,y+b+2*l,180,0,r);

setlinestyle(2,0,1);

rectangle(60,80,460,380);

setlinestyle(0,0,3);

rectangle(70,90,450,370);

setlinestyle(0,0,1);

line(450,330,250,330);

line(250,330,250,370);

line(330,330,330,370);

line(400,330,400,370);

line(250,350,450,350);

outtextxy(275,340,"Name");

outtextxy(255,360,"baiyang");

outtextxy(340,340,"Class");

outtextxy(335,360,"05010125");

outtextxy(410,340,"Number");

outtextxy(420,360,"18");

while(n!=0)

{

printf("please enter n:");

scanf ("%f",&n);

cleardevice ();

setbkcolor(LIGHTGREEN);

setcolor(1);

x=320,y=300;

setlinestyle(0,0,1);

rectangle(x-2*r*n,y-2*h*n,x,y);

rectangle(x-2*r*n,y-h*n,x,y);

setlinestyle(0,2,1);

rectangle(60,40,460,380);

setlinestyle(0,0,3);

rectangle(70,80,450,370);

setlinestyle(0,0,1);

line(450,330,250,330);

line(250,330,250,370);

line(330,330,330,370);

line(400,330,400,370);

line(250,350,450,350);

outtextxy(275,340,"Name");

outtextxy(255,360,"baiyang");

outtextxy(340,340,"Class");

outtextxy(335,360,"05010125");

outtextxy(410,340,"Number");

outtextxy(420,360,"18");

}

getch ();

closegraph ();

}

图片附件: 游客没有浏览图片的权限,请 登录注册

搜索更多相关主题的帖子: include 
2007-06-13 16:44
baiyang26
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2006-6-27
收藏
得分:0 

但是改完了之后,结果运行不出来,致使为什么

2007-06-13 18:20
baiyang26
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2006-6-27
收藏
得分:0 
那应该怎样用
2007-06-14 07:20
快速回复:[求助]这个程序错在哪了?????
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.030028 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved