该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
以下是一个用线和矩形绘制的简单赛车
#include
#include
void main(void){
int gdriver=DETECT,gmode;
initgraph(&gdriver,&gmode, "");
setbkcolor(7);
setwritemode(XOR_PUT);
setcolor(BLUE);
setlinestyle(SOLID_LINE,0,3);
rectangle(280,350,320,390);
rectangle(270,340,330,350);
rectangle(290,320,310,340);
rectangle(270,390,330,400);
setcolor(5);
line(290,350,290,390);
line(300,300,300,320);
line(300,350,300,390);
line(310,350,310,390);
line(285,300,315,300);
getch();
closegraph();
}
接下来我们试着绘制赛道,周围的绿化树木和简单的集装箱车
代码如下:
#include
#include
#include
#include
#include
const
int u = 26;
int i = 2;
int j = 3;