文件名称:color-map
介绍说明--下载内容均来自于网络,请自行研究使用
地图上色
#include <stdio.h>
#include <stdlib.h>
#define MAX 100
typedef struct{int code
int color
}Area /*区域结构*/
typedef struct{Area a[MAX]
int vn
int en
}Map /*地图结构*/
void CreateM(Map m)/*生成地图,并统一成一色*/
{int i
printf(“\nIntput vn en”)
scanf(" d d",&m.vn,&m.en)
for(i=0 i<m.vn i++)
{m.a[i].code=i
m.a[i].color=0
printf("\nInput an area s name")
gets(m.a[i].name)
}
}
-# Include color maps <stdio.h># Include <stdlib.h># Define MAX 100 typedef struct {int code int color } Area /* regional structure*/typedef struct {Area a [MAX] int vn int en } Map /* map structure*/void CreateM (Map m) /* generate a map, and unified into one color*/{int i printf (" \ nIntput vn en" ) scanf (" d d" , & m.vn, & m.en) for (i = 0 i <m.vn i++)
{m.a[i].code=i
m.a[i].color=0
printf("\nInput an area s name")
gets(m.a[i].name)
}
}
#include <stdio.h>
#include <stdlib.h>
#define MAX 100
typedef struct{int code
int color
}Area /*区域结构*/
typedef struct{Area a[MAX]
int vn
int en
}Map /*地图结构*/
void CreateM(Map m)/*生成地图,并统一成一色*/
{int i
printf(“\nIntput vn en”)
scanf(" d d",&m.vn,&m.en)
for(i=0 i<m.vn i++)
{m.a[i].code=i
m.a[i].color=0
printf("\nInput an area s name")
gets(m.a[i].name)
}
}
-# Include color maps <stdio.h># Include <stdlib.h># Define MAX 100 typedef struct {int code int color } Area /* regional structure*/typedef struct {Area a [MAX] int vn int en } Map /* map structure*/void CreateM (Map m) /* generate a map, and unified into one color*/{int i printf (" \ nIntput vn en" ) scanf (" d d" , & m.vn, & m.en) for (i = 0 i <m.vn i++)
{m.a[i].code=i
m.a[i].color=0
printf("\nInput an area s name")
gets(m.a[i].name)
}
}
(系统自动生成,下载前可以参看下载内容)
下载文件列表
color map.cpp