数据结构程序设计实验报告(2) 实验人:*** 学号: ********* 时间:2015.4.8 实验原理:本实验是是用线性表设计一个一元多项式简单的计算器。 实验过程中的问题:在处理不同次多项式加、减时要特别处理,输出时负项也要特别处理........ 实验结果: 顺序 Enter the degree of the Polynomial: 5 Enter the coef. of a(0):3 Enter the coef. of a(1):0 Enter the coef. of a(2):5 Enter the coef. of a(3):8 Enter the coef. of a(4):0 Enter the coef. of a(5):3 第一个多项式是: 3+5x^2+8x^3+3x^5 Enter the degree of the Polynomial: 6 Enter the coef. of a(0):9 Enter the coef. of a(1):11 Enter the coef. of a(2):0 Enter the coef. of a(3):4 Enter the coef. of a(4):5 Enter the coef. of a(5):8 Enter the coef. of a(6):2 第二个多项式是: 9+11x+4x^3+5x^4+8x^5+2x^6 这两个多项式的和是: 12+11x+5x^2+12x^3+5x^4+11x^5+2x^6 这两个多项式的差是: -6-11x+5x^2+4x^3-5x^4-5x^5-2x^6 这两个多项式的积是: 27+33x+45x^2+139x^3+103x^4+71x^5+96x^6+80x^7+86x^8+31x^9+24x^10+6x^11 Press any key to continue 思考与疑问:把缺项不存在表里可能会少占内存,但处理加、减时要困难点。