我的邻居山田君下载:请各位c语言高手帮我个忙,本人需要急救

来源:百度文库 编辑:查人人中国名人网 时间:2024/04/27 21:14:54
请帮我用c语言编一个简单图形,例如房子,花等最好色彩鲜艳一点,用c图形函数一定要简单一点的小女子在这里谢谢了,提高悬赏分了
就像计算机二级考试一样的操作环境应该是dos c 吧,以下为一个小例子#include<graphics.h>
#include<stdio.h>
main()
{
int gn1[]={420,150,540,150,580,180,380,180,420,150};
int driver=DETECT, mode;
initgraph(&driver,&mode," ");
setbkcolor(BLACK);setcolor(WHITE);
drawpoly(5,gn1);

rectangle(420,180,540,290);
rectangle(435,210,460,230);
line(435,220,460,220);
line(447.5,210,447.5,230);
rectangle(500,225,525,290);
rectangle(435,125,445,150);
circle(442,110,6);
circle(453,102,4);
circle(464,94,2);
line(480,310,505,310);
line(465,335,485,335);
line(450,355,466,355);
getch();
closegraph();
}

画月亮和星星的
void picture()
{int seed=1858;
int i,dotx,doty,h,w,color,maxcolor;
cleardevice();
setbkcolor(BLACK); /*设置黑色背景*/
moveto(20,300); /*画箭头*/
linerel(4*50,0);
linerel(-2*50,-1*50);
linerel(0,2*50);
linerel(2*50,-1*50);
setcolor(YELLOW); /*画月亮*/
setfillstyle(1,YELLOW);
arc(250,50,180,270,101);
arc(200,100,135,315,73);
floodfill(150,80,YELLOW);

maxcolor=getmaxcolor(); /*得到当前模式和最多颜色数*/
w=getmaxx();
h=getmaxy();
srand(seed); /*画星*/
for(i=0;i<250;i++)
{ dotx=i+random(w-1);
doty=1+random(h-1);
color=random(maxcolor);
setcolor(color);
putpixel(dotx,doty,color); /*用点表示小星*/
circle(dotx+1,doty+1,1); /*用圆表示大星*/
}
srand(seed);

setcolor(2);
settextstyle(3,0,2);
settextjustify(LEFT_TEXT,0);
outtextxy(50,450,"Please press any key!");

setcolor(BLUE);
settextjustify(LEFT_TEXT,0);
settextstyle(3,0,3);
outtextxy(250,300,"Lu Ping(EE0305,200381067)");

getch();
closegraph();
}

请描述清楚以下问题:
1:C是指DOS C还是WINDOWS VC\BC等
2:如果是DOS C,用VGA模式还是VESA模式

要帮忙,怎么不叫我啊,这点问题你都不行,太笨了吧猪。来为快点叫姐帮你,哈哈

以前写过的,就是用的TC2.0。还画了好多递归图形,不过可惜都丢了。