You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ddd/城市地铁导航系统.c

62 lines
1.1 KiB

1 year ago
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
1 year ago
#define MAX 1000
typedef struct node {
1 year ago
char a[100];
struct node* next;
}edgenode;
1 year ago
typedef struct {
1 year ago
char name[100];
1 year ago
edgenode* firstnode;
1 year ago
}vexnode;
typedef struct {
1 year ago
vexnode adjust[7];
1 year ago
int e, n;
1 year ago
}
void createjz(){//创建邻接矩阵函数
edgenode *p;
aaa();
int i;
for(i=0;i<nm.n;i++){
p=nm.adjust[i].firstnode;
while(p!=NULL){
int h;
for(h=0;h<nm.n;h++)
if(!strcmp(p->a,nm.adjust[h].name)) break;
cont[i][h]=1;
p=p->next;
}
}
}
void print() {
edgenode* p;
int i;
for(i=0;i<nm.n;i++){
printf("[%s]",nm.adjust[i].name);
p=nm.adjust[i].firstnode;
while(p!=NULL){
printf("-->[%s]",p->a);
p=p->next;
}
printf("\n");
}
1 year ago
}
int main()
{
creatnode();
createlist();
int n=10;
printf("正在初始化数据,请稍候!\n");
//proc();
printf("欢迎使用本系统!\n");
while(n){
printf("欢迎来到上海市地铁交通服务平台!\n");
printf(" 最佳出行线路推荐\n");
printf(" 退出系统!\n");
printf("请输入!\n");
scanf("%d",&n);
}
return 0;
}