【正文】
int i,j,t,k,sum=0。j++) printf(%4d ,[i][j].adj)。i++) {for(j=0。 4 for (i=0。 garcs[b][a]=garcs[a][b]。 b=locatedvex(*g,y)。c)。 printf(input the distance of a road again :)。 b=locatedvex(*g,y)。c)。k++){ printf(input the distance of a road :)。} /* 初始化鄰接矩陣 */ for(k=0。ngvexnum。mgvexnum。i++) scanf(%s,gvexs[i])。 for(i=0。garum)。 /* 輸入城市的個數(圖 的頂點數) */ printf(input the number of roads (at least 10 roads):)。 scanf(%d,amp。 3 vertextype x,y。 /* 用普里姆算法求最小生成樹時的輔助數組 */ } mgraph。 /*鄰接矩陣 */ int vexnum,arum。 typedef struct{ vertextype vexs[maxnum]。 /*頂點的鄰接點 */ int lowcost。 /*弧上相關信息的指針 */ }arccell。 /*定義城市名稱 */ typedef struct arccell { int adj。 } minispantree(g,u)。 scanf(%s,u)。 while(k==1){ printf(the name of the city is wrong!\n)。 scanf(%s,u)。 print(g)。g)。 int k。 3 設計思想 普里姆算法 4 核心代碼 int main() //主函數 { mgraph g。要求在屏幕上顯示得到的最小生成樹中包括了哪些城市間的道