\START85\ \COMMENT=Program file dated 01/10/96, 18:19 \NAME=Multinom \FILE=MULTINOM.85P :ClLCD :Input "Terms of polynomial: ",T :T\->\dimL C :T\->\dimL E :T\->\dimL V :For(P,1,T,1) :Disp P :Input "COEF: ",CI :CI\->\C(P) :Input "EXP: ",EI :EI\->\E(P) :End :Input "To what power? ",D :ClLCD :Disp "This expansion has" :Outpt(2,1,((D+(T-1)) nCr D)) :Outpt(2,16,"terms.") :Pause :Lbl PMT :ClLCD :For(P,1,T,1) :Disp P :Input "Exponent of var: ",VI :VI\->\V(P) :End :For(P,1,T,1) :If E(P)==0 :Then :Disp P :Input "Assumed exponent: ",AE :AE\->\V(P) :Else :V(P)/E(P)\->\V(P) :End :End :0\->\S :For(P,1,T,1) :S+V(P)\->\S :End :If S\<>\D :Goto PMT :For(P,1,T,1) :If int V(P)\<>\V(P) or V(P)<0 :Goto PMT :End :D!\->\F :For(P,1,T,1) :F/(V(P)!)\->\F :End :For(P,1,T,1) :F*(C(P)^V(P))\->\F :End :Disp F\>Frac\ :Pause :Goto PMT \STOP85\