欢迎来到天天文库
浏览记录
ID:71181861
大小:42.50 KB
页数:2页
时间:2021-11-26
《邻接矩阵》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、邻接矩阵:NO.1//aa.cpp:Definestheentrypointfortheconsoleapplication.//#include"stdafx.h"#include"stdio.h"#include"stdlib.h"#defineMAXVEX30//图的顶点个数typedefintVextexType;typedefstruct{VextexTypevexs[MAXVEX];intedges[MAXVEX][MAXVEX];i
2、ntn,e;}Mgraph;voidCreatGraph(Mgraph&ga){inti,k,w,m,p;printf("请输入图的顶点数和边数:");scanf("%d,%d",&(ga.n),&(ga.e));printf("请输入顶点信息(顶点编号),建立顶点信息表:");for(i=0;i
此文档下载收益归作者所有