【正文】
input(l[n])。break。 case 2: printf( Input the Poly number to add,and the Poly number stored in\n)。 scanf(%d,%d,%d,amp。n,amp。m,amp。i)。 add(l[n],l[m],l[i])。break。 case 3: printf( Input the Poly number to subtract,and the Poly number stored in\n)。 scanf(%d,%d,%d,amp。n,amp。m,amp。i)。 sub(l[n],l[m],l[i])。break。 case 4: printf(Input the number to operate and the value of x:\n)。 scanf(%d,%f,amp。n,amp。a)。 printf(%f\n,value(l[n],a))。break。 case 5: printf(Input the Poly number:\n)。 scanf(%d,amp。n)。 destroy(l[n])。break。 case 6: printf( Input the Poly number:\n)。 scanf(%d,amp。n)。 print(l[n])。 case 0: n=0。break。 default:printf(ERROR!)。 } printf(Choose the number to operate:\n)。 scanf(%d,amp。c)。 } printf(OK!\n)。程序運(yùn)行截圖:實(shí)驗(yàn)總結(jié): 這次實(shí)驗(yàn)室數(shù)據(jù)結(jié)構(gòu)第一次上機(jī)實(shí)驗(yàn),由于與C語(yǔ)言課程的學(xué)習(xí)相隔已經(jīng)一個(gè)學(xué)期,對(duì)C語(yǔ)言有些生疏和遺忘,在編程過(guò)程中出現(xiàn)很多錯(cuò)誤。再加上本次實(shí)驗(yàn)的函數(shù)較多,在最后編譯的時(shí)候出現(xiàn)了大量errors和warnings,不得不耐心地逐行檢查,最終才得以完成這次試驗(yàn)??傮w來(lái)說(shuō),這次實(shí)驗(yàn)使我及時(shí)復(fù)習(xí)了C語(yǔ)言,為以后的數(shù)據(jù)結(jié)構(gòu)課程的學(xué)習(xí)和其后的上機(jī)實(shí)驗(yàn)做好了準(zhǔn)備。