\START85\ \COMMENT=Program file dated 12/22/98, 16:35 \NAME=BINEX \FILE=C:\TI85LINK\PROGRAMS\BINEX.85P :ClLCD :Lbl B1 :0\->\A9 :Menu(1,"binex",A1,2,"term",A2,3,"prob",A3,5,"exit",A5,4,"1 var",A4) :Lbl A4 :2\->\A9:1\->\A:Goto A1 :Lbl A2 :1\->\A9 :Lbl A1 :{1,1}\->\dim MAT1 :ClLCD :Disp "What is the exponent?" :Input K :Disp "What is first coef.?" :Input G :If A9\<>\2:Then :Disp "What is second coef.?" :Input A:End :{1,K+1}\->\dim MAT1 :dim MAT1\->\dim MAT2 :For(KK,0,K) :(K nCr KK)\->\MAT1(1,KK+1) :End :For(KK,0,K) :(G^(K-KK)*A^KK*MAT1(1,KK+1))\->\MAT2(1,KK+1) :End :If A9==0 :Pause MAT2 :If A9==1 :Then :Disp "Find what term?" :Input B9 :ClLCD :Outpt(1,1,"term # is:" :Outpt(1,7,B9) :Outpt(3,4,MAT2(1,B9)) :Outpt(3,8,"x^" :Outpt(3,10,K-B9+1) :Outpt(3,13,"y^" :Outpt(3,15,B9-1) :Goto B1:End :If A9==2 :Then :Disp "What is second var.?" :Input A :For(x,K+1,1,\(-)\1) :MAT2(1,x)*A^(x-1)\->\MAT2(1,x) :End:ClLCD :Disp "The expansion is:" :Pause MAT2 :Goto B1 :Lbl A3 :ClLCD :Disp "How many trials?" :Input K :Disp "Prob. of success?" :Input G :Disp "Minimum successes?" :Input A9 :If A9<0 :Goto B2 :Disp "Maximum successes?" :Input B9 :If B9>K :Goto B2 :B9-A9+1\->\dimL LST1 :0\->\C9 :For(A,A9,B9) :C9+1\->\C9 :(K nCr A)*G^A*(1-G)^(K-A)\->\LST1(C9) :End :Disp "Probability is:",(sum LST1)\>Frac\ :Goto B1 :Lbl B2 :ClLCD :Disp "ERROR 666 STUPIDITY" :Pause :Goto B1 :Lbl A5 \STOP85\