C语言校园导游系统
C語言校園導游系統(tǒng)
:寫一個校園導游系統(tǒng),包括瀏覽學校全景,查看景點信息,查找景點之間最短路線
參考代碼如下:
#include<stdio.h>
#define MAX 1000
#include<string.h>
#define MaxViewNum 20
int Menu();//菜單函數(shù)聲明
int Map();//平面圖函數(shù)聲明
int Information();//簡介函數(shù)聲明
int Search();
int ShortestPath_Floyd();//弗洛伊德函數(shù)聲明
typedef struct{
char name[50];//景點名稱
char number[50];//景點代號
int length[50][50];//景點路之間徑長度
char introduction[1000];//景點介紹
}Elemtype;//景點信息
typedef struct{
int num;//景點編號
Elemtype date;//景點信息
}View;//定義景點
typedef struct{
View view[MaxViewNum];
View vex[MaxViewNum][MaxViewNum];
}MGraph;
MGraph MGr;//全局變量,定義MG為MGraph類型
//主函數(shù)
void main(){
int i;
Menu();//展示用戶界面
printf("\n\n請輸入你選
總結
- 上一篇: gephi mysql_【转】使用GEP
- 下一篇: 【ISIS基础】