{1,"forest","tree and grass"},
{2,"restaurant","eat food"},
{3,"building","teaching room"},
{4,"expriment","action myself"},
{5,"gate","shool gate"},
{6,"playground","playing ball"},
{7,"life-center","service center"},
{8,"super market","buy evergthing"},
{9,"camera room","see movie"}};
int i,j,k,n=10;
int d[num],p[num],sd[num][num],sp[num][num],a[num][num];
clrscr();
for(i=0;i<n;i++) /*给景点之间的路径赋最大值*/
{
for(j=0;j<n;j++)
a[i][j]=maxdist;
}
a[0][2]=30; /*景点之间的路径长度*/
a[0][5]=40;
a[0][1]=20;
a[1][5]=60;
a[1][4]=40;
a[1][6]=30;
a[2][3]=35;
a[2][7]=40;
a[3][10]=20;
a[3][8]=15;
a[4][9]=30;
a[4][8]=35;
a[4][10]=10;
a[5][10]=10;
a[5][8]=45;
a[5][2]=20;
a[6][0]=70;
a[7][0]=50;
a[8][9]=20;
a[9][1]=55;
clrscr();
printf("\t --Welcome You Use Guide--\n"); /*程序良好界面的设置和操作说明*/
printf("\t*****************************************\n");
printf("\t* *\n");
printf("\t*\tInformation-i\tVisit-v\t\t*\n\t*\t About-a\tQuit-q\t\t*\n");
printf("\t*\t\t\t\t\t*\n\t*\t\t\t\t\t*\n\t*\t\t\t\t\t*\n\t*\t\t\t\t\t*\n\t*\t\t\t\t\t*\n");
printf("\t*****************************************\n");
printf("\t*please enter code:i v q \t*\n");
printf("\t*clear the screen:c \t\t\t*\n");
printf("\t*****************************************\n");
do /*循环输入字符进行操作*/
{
switch(getchar()) /*switch语句判断要进行的操作*/
{
case'a':{ /*程序知识产权声明*/
printf("This is a guide program\n");
printf("designer:hua time:2006.1.1\n");
}break;
case'i':{ /*输入景点代码查景点名称和简介*/
while(1)
{
printf("input number 0->9: (!=0->9 q)\n");
scanf("%d",&i);
if(i<0||i>9) /*输入非0->9退出*/