实验三 最短路径的算法(离散数学实验报告) 下载本文

}

{ printf(\ \ dist(i,j); printf(\

printf(\ (The length is: %d)\\n\ }

void dist(int first,int end) { int x; x=P[first][end]; if(x!=first)

{ dist(first,x); dist(x,end); } else printf(\}

输出结果:

5