您当前的位置: 首页 >  矩阵

川川菜鸟

暂无认证

  • 4浏览

    0关注

    969博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

根据顶点边数和点信息输出邻接矩阵

川川菜鸟 发布时间:2021-07-07 19:09:56 ,浏览量:4

// ConsoleApplication23.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。
//

#include                                      
#include
using namespace std;
#define MAXVEX 100
typedef char VertexType;
typedef int EdgeType;
typedef struct
{
	VertexType vexs[MAXVEX];
	EdgeType edges[MAXVEX][MAXVEX];
	int n, e;
}MGraph;
MGraph CreateMGraph(int pd)
{
	MGraph G;
	int i, j, k, n;
	cout  G.n >> G.e;
	cout  k;
		G.edges[i][j] = k;
		if (pd == 0)
			G.edges[j][i] = k;
	}
	return G;
}
void DisplayMGraph(MGraph G, int pd)
{
	for (int i = 0; i             
关注
打赏
1665165634
查看更多评论
0.1542s