\START85\ \COMMENT=Program file dated 01/31/96, 21:52 \NAME=TrapSimp \FILE=TRAPSIMP.85P :Prompt A :Prompt B :Prompt N :seq(y1,x,A,B,(B-A)/N)\->\M :For(X,2,N) :2*M(X)\->\M(X) :End :Disp "Trapezoidal Rule:" :Disp .5((B-A)/N)*sum M :If N/2==iPart (N/2) :Then :For(X,2,N,2) :2*M(X)\->\M(X) :End :Disp "Simpson's Rule:" :Disp (1/3)((B-A)/N)*sum M :End \STOP85\