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