【正文】
從接觸C語言編程到現(xiàn)在,我就覺得:編程不是簡簡單單的寫出程序,更多的是處理出現(xiàn)的語法和邏輯錯誤。e39。s39。Z39。 to exit the program\n\n\n)。 do { printf(Please enter the 39。 //printf(==========\n)。j)。 i = u。 b = j。 i MAX_VERTEX_NUM。 i MAX_VERTEX_NUM。number)。 dist[4][7] = dist[7][4] = 100。 ++i) { dist[i][i] = 0。 strcpy(vertex[9].introduce,Information institute, college building)。 /*vertex[7].number = 8。 strcpy(vertex[5].name,Area A restaurant)。 strcpy(vertex[2].introduce,Area A student rest area)。 printf( (7)library(8)No. 1 teaching building(9)No. 13 teaching building\n)。 printf( (1)Area C dormitory building(2)Area A dormitory building(3)Area B dormitory building\n)。 char introduce[100]。 Path(i,j)。 if(i 0 amp。 } printf(%s。 a = i。 ++u) { for(i = 1。 for(i = 1。 scanf(%d,amp。 printf( (4)Area C restaurant (5)Area A restaurant(6)Area B restaurant\n)。 dist[7][8] = dist[8][7] = 60。 dist[1][4] = dist[4][1] = 50。 ++i) { for(j = 1。*/ vertex[8].number = 8。 strcpy(vertex[6].name,Area B restaurant)。 strcpy(vertex[3].introduce,Area B student rest area)。 vertex[1].number = 1。e39。s39。Z39。 to exit the program\n\n\n)。 do { printf(Please enter the 39。 int number。 The shortest distance is:150meters.Input:i Output:Please enter the number of query site: 3Output:name: Area B dormitory building introduction:Area B student rest areainput:e output:Thank you for you use 1.抽象數(shù)據(jù)類型定義typedef struct{ char name[100] 。課程設(shè)計報告書課程名稱 數(shù)據(jù)結(jié)構(gòu) 設(shè)計題目 校園導(dǎo)航系統(tǒng) 專業(yè)班級 計算機114 班 目錄……………………………………………… 2……………………………………………… 2……………………………………………… 2……………………………………………… 2………………………………………………… 2………………………………………………… 3………………………………………………… 4………………………………………………12…………………………………………………………12…………………………………………………………13 附錄………………………………………………………145 總結(jié)與展望…………………………………………… 20……………………………………………… 21……………………………………………… 211 設(shè)計時間 2013年12月3日2 設(shè)計目的1.加深對《數(shù)據(jù)結(jié)構(gòu)》這一課程所學(xué)內(nèi)容的進一步理解與鞏固2.通過完成課程設(shè)計,逐漸培養(yǎng)自己的編程能力;3.培養(yǎng)給出題目后,構(gòu)建框架,用計算機解決的能力;4.通過調(diào)試程序積累調(diào)試C程序設(shè)計的經(jīng)驗; 3設(shè)計任務(wù)給出校園各主要建筑的名稱信息及有線路聯(lián)通的建筑之間的距離,利用校園導(dǎo)航系統(tǒng)計算出給定的起點到終點之間的最近距離及線路。 int number。 char introduce[100]。s39。 loop: scanf(%c,amp。) { c += 32。) { shortestpath()。) { printf(\n\n\n\t\t\t\tThank you for you use\n\n\n)。 strcpy(vertex[1].name,Area C dormitory building)。 vertex[4].number = 4。 strcpy(vertex[6].introduce,Area B student dining area)。 strcpy(vertex[8].name,No. 1 teaching building)。 j MAX_VERTEX_NUM。 dist[2][5] = dist[5][2] = 30。 dist[8][9] = dist[9][8] =120。 printf( | | | \n)。number)。 i MAX_VERTEX_NUM。 i MAX_VERTEX_NUM。 b = j。\n,vertex[j].name)。amp。 return。}Vertex。 printf( |