%Header Record Format:TXT Communication SW:0 Data Type:PG Capacity:1502 File Name:AP Group Name: Password: Option1:NL Option2: Option3: Option4: %Data Record \ClrText \Locate 3,1,"\aster\aster\aster AP Solver \aster\aster\aster" \Locate 7,3,"You know..." \Locate 2,5,"[F1] a,d" \Locate 2,6,"[F2] 2 terms" \Do:\Getkey\->C:\LpWhile C\<>69\ And C\<>79 \ClrText \If C=79:\Then " ":\Locate 1,1,"Tn=a+(n-1)d":"a="?\->A:"d="?\->D:\IfEnd \If C=69:\Then " ":\Locate 1,1,"Known term 1":"n="?\->E:"Tn="?\->F " ":\Locate 1,6,"Known term 2":"n="?\->G:"Tn="?\->H G-E\->P \If P=0 \Then \ClrText "Impossible!" "[EXE] to re-start" \Stop \IfEnd H-F\->Q:Q/P\->D:F-D(E-1)\->A 29\->C \IfEnd \Do C=29\=>\Goto1 \ClrText \Locate 1,1,"\aster\aster\aster\aster AP options \aster\aster\aster\aster" \Locate 1,3,"[F1] Tn [F2] Sn" \Locate 1,4,"[F3] Tn= [F4] Sn=" \Locate 1,5,"[F5] Table [F6] Rule" \Locate 12,7,"[EXIT] End" \Do:\Getkey\->C:\LpWhile C=0 \Lbl 1 \ClrText \If C=79 \Then " ":\Locate 1,1,"Term n" " n="?\->N \Locate 4,2,N \Locate 1,3,"Tn=" \Locate 4,3,A+D(N-1)\Disp\IfEnd \If C=69 \Then " ":\Locate 1,1,"\Sum to n terms" " n="?\->N \Locate 4,2,N \Locate 1,3,"Sn=" \Locate 4,3,N(2A+(N-1)D)/2\Disp\IfEnd \If C=59 \Then " " \If D=0 \Then \Locate 1,1,"All terms are" \Locate 15,1,A \Else \Locate 1,1,"Nth term equals" "Tn="?\->T \Locate 4,2,T \If (T-A)/D+1>0 \Then \Locate 1,3," n= " \Locate 4,3,(T-A)/D+1 \Else \Locate 1,3,"No solution" \IfEnd \IfEnd\Disp\IfEnd \If C=49 \Then " ":\Locate 1,1,"\Sum of first" " ":\Locate 1,2,"n terms equals" "Sn="?\->S \Locate 4,3,S 0\->U:0\->V \If D=0 \Then 0\->P A\<>0\=>S/A\->V \Else (2A-D)\x^2+8DS\->P P\>=0\=>(D-2A+\sqrtP)/(2D)\->V P\>=0\=>(D-2A-\sqrtP)/(2D)\->U \If U>V \Then V\->S:U\->V:S\->U \IfEnd \IfEnd \If P\>=0\ And V>0 \Then \Locate 1,4," n=" \Locate 4,4,V \If U>0 \Then " ":\Locate 1,5," n=" \Locate 4,5,U \IfEnd \Else \Locate 1,4,"No solution" \IfEnd\Disp\IfEnd \If C=39 \Then " ":\Locate 1,1,"Table of values" " ":\Locate 1,2,"n from 1 to":?\->\R End \SumDispOn:\aRanType "A+D(\R n-1)"\->\R an 1\->\R Start A\->\R a1 A-D\->\R a0 ""\->\R bn \R SelOff \R bn \R SelOn \R an \DispR-Tbl\Disp\IfEnd \If C=29 \Then 0\->C \Locate 2,2,"Tn=a+(n-1)d" \Locate 4,3,"=dn+e" \Locate 3,5,"a=":\Locate 5,5,A \Locate 3,6,"d=":\Locate 5,6,D \Locate 3,7,"e=":\Locate 5,7,A-D\Disp\ClrText \Locate 1,2,"Recursive" \Locate 1,3,"\R an1=\R an+D" \Locate 1,3,"T" \Locate 6,3,"T" \Locate 3,4,"\R a1=" \Locate 3,4,"T" \Locate 6,4,A \Locate 4,6,"D=" \Locate 6,6,D\Disp\IfEnd \LpWhile C\<>47 \ClrText "\Done" %End %Header Record Format:TXT Communication SW:0 Data Type:PG Capacity:1350 File Name:FINDRULE Group Name: Password: Option1:NL Option2: Option3: Option4: %Data Record \ClrText 0\->A~Z \Dim \List 1\->A \Dim \List 2\->B \If A\<>B\ Or A<2 \Then \Locate 7,1,"ERROR!" \Locate 1,3,"Need at least 2 pairs" \Locate 3,4,"of points in both" \Locate 4,5,"\List1 \and \List2" \Locate 2,7,"Check then restart!" \Stop \IfEnd \EE\(-)8\->Z {0,0,0,0}\->\List 4 \@F7776 'start testing ' \Locate 1,2,"\Linear No" \LinearReg \List 1,\List 2 \If \Cor\x^2>1-Z \Then 1\->L \Locate 8,2,"Yes" \IfEnd \List 6\x^2\->\List 5 \Sum \List 5\->\List 4[1] 'end linear test ' \Locate 1,3,"\Power No" \Min(\List 1)>0\=>1\->J \Min(\List 2)>0\=>1\->K \If J=1\ And K=1\ And L\<>1 \Then \PowerReg \List 1,\List 2 \If \Cor\x^2>1-Z\ And (\Rb-1)\x^2>Z \Then 1\->P \Locate 8,3,"Yes" \IfEnd \List 6\x^2\->\List 5 \Sum \List 5\->\List 4[2] \Else \Locate 8,3,"\aster " \IfEnd 'end power test ' \Locate 1,4,"\Quad No" \If L\<>1\ And A\>=3 \Then \QuadReg \List 1,\List 2 \List 6\x^2\->\List 5 \Sum \List 5\->\List 4[3] \If \List 4[3]Q \Locate 8,4,"Yes" \IfEnd \Else \Locate 8,4,"\aster " \IfEnd 'end quad test ' \Locate 1,5,"\Exp No" \If K=1 \Then \ExpReg \List 1,\List 2 \If \Cor\x^2>1-Z \Then 1\->E \Locate 8,5,"Yes" \IfEnd \List 6\x^2\->\List 5 \Sum \List 5\->\List 4[4] \Else \Locate 8,5,"\aster " \IfEnd 'end exp test ' \If L\ Or P\ Or Q\ Or E \Then \Locate 7,6,"(\aster=not tested)"\Disp\ClrText {0,0,0,0}\->\List 5 L\=>1\->\List 5[1] P\=>2\->\List 5[2] Q\=>3\->\List 5[3] E\=>4\->\List 5[4] \Else {1,2,3,4}\->\List 5 \SortA(\List 4,\List 5) \For 1\->I \To 4 \If \List 4[I]>0 \Then \Locate 12,\List 5[I]+1,I-D \Else \Isz D \IfEnd \Next \Locate 1,6,"Likely rule: 1=Best"\Disp\IfEnd \For 1\->I \To 4 \List 5[I]\->M \If M=1 \Then \ClrText \LinearReg \List 1,\List 2 \Locate 1,2,"\Linear" \Locate 2,4,"y=ax+b" \Locate 2,5,"a=":\Locate 4,5,\Ra \Locate 2,6,"b=":\Locate 4,6,\Rb\Disp\IfEnd \If M=2\ And J\ And K \Then \ClrText \PowerReg \List 1,\List 2 \Locate 1,2,"\Power" \Locate 2,4,"y=a(x)^b" \Locate 2,5,"a=":\Locate 4,5,\Ra \Locate 2,6,"b=":\Locate 4,6,\Rb\Disp\IfEnd \If M=3\ And A\>=3 \Then \ClrText \QuadReg \List 1,\List 2 \Locate 1,2,"\Quadratic" \Locate 2,4,"y=ax\x^2+bx+c" \Locate 2,5,"a=":\Locate 4,5,\Ra \Locate 2,6,"b=":\Locate 4,6,\Rb \Locate 2,7,"c=":\Locate 4,7,\Rc\Disp\IfEnd \If M=4\ And K \Then \ClrText \ExpReg \List 1,\List 2 \Locate 1,2,"\Exponential" \Locate 2,4,"y=a(b)^x" \Locate 2,5,"a=":\Locate 4,5,\Ra \Locate 2,6,"b=":\Locate 4,6,\e^x\Rb\Disp\IfEnd \Next \@F776 \ClrText %End %Header Record Format:TXT Communication SW:0 Data Type:PG Capacity:2278 File Name:GP Group Name: Password: Option1:NL Option2: Option3: Option4: %Data Record \ClrText \Locate 3,1,"\aster\aster\aster GP Solver \aster\aster\aster" \Locate 7,3,"You know..." \Locate 2,5,"[F1] a,r" \Locate 2,6,"[F2] 2 terms" \Do:\Getkey\->C:\LpWhile C\<>69\ And C\<>79 \ClrText:" " \If C=79:\Then \Locate 1,1,"Tn=a.r^(n-1)":"a="?\->A:A\->B:"r="?\->R:R\->S:\IfEnd \If C=69:\Then \Locate 1,1,"Known term 1":"n="?\->D:"Tn="?\->F " ":\Locate 1,6,"Known term 2":"n="?\->G:"Tn="?\->H G-D\->P \If PFH=0 \Then \ClrText \Lbl 2 "No good!" "[EXE] to re-start" \Stop \IfEnd H/F\->Q Q<0\ And \Frac (P/2)=0\=>\Goto2 P\xrtQ\->R F/(R^(D-1))\->A R*(\(-)1)^(1+2\Frac (P/2))\->S F/(S^(D-1))\->B 29\->C \IfEnd \Do C=29\=>\Goto1 \ClrText \Locate 1,1,"\aster\aster\aster\aster GP options \aster\aster\aster\aster" \Locate 1,3,"[F1] Tn [F2] Sn" \Locate 1,4,"[F3] Tn= [F4] Sn=" \Locate 1,5,"[F5] Table [F6] Rule" \Locate 1,6,"[Sin] Sinf" \Locate 12,7,"[EXIT] End" \Do:\Getkey\->C:\LpWhile C=0 \Lbl 1 \ClrText \If C=79 \Then " ":\Locate 1,1,"Term n" " n="?\->N AR^(N-1)\->T BS^(N-1)\->U \Locate 4,2,N \Locate 1,3,"Tn=" \Locate 4,3,T \If T\<>U \Then " ":\Locate 1,4,"\or" \Locate 4,4,U \IfEnd \Locate 1,7,""\Disp\IfEnd \If C=69 \Then " ":\Locate 1,1,"\Sum of first n terms" " n="?\->N \Locate 4,2,N A(1-R^N)/(1-R)\->T \Locate 1,3,"Sn=" \Locate 4,3,T B(1-S^N)/(1-S)\->U \If T\<>U \Then " ":\Locate 1,4,"\or" \Locate 4,4,U \IfEnd \Locate 1,7,""\Disp\IfEnd \If C=59 \Then \If R>0 \Then " ":\Locate 1,1,"Nth term equals" "Tn="?\->P \Locate 4,2,P \Locate 1,3," n= " \If AP>0 \Then \Locate 4,3,\In (P/A)/\In R+1\Disp\Else \Locate 1,3,"\Not possible"\Disp\IfEnd \Else 1\->C \IfEnd \IfEnd \If C=49 \Then \If R>0 \Then " ":\Locate 1,1,"\Sum of first" " ":\Locate 1,2,"n terms equals" "Sn="?\->L \Locate 4,3,L \Locate 1,4," n= " \If AL\>=0 \Then \If R<1 \Then \If \Abs L<\Abs (A/(1-R)) \Then \Locate 4,4,\In (1-L(1-R)/A)/\In R \Else " ":" " \Locate 1,4,"\Sum to infinity" \Locate 1,5,"equalled \or exceeded" \IfEnd \Else " " \Locate 4,4,\In (1-L(1-R)/A)/\In R \IfEnd \Else " " \Locate 1,4,"No solution" \IfEnd \Else 1\->C \IfEnd C\<>1\=>\Locate 1,7,""\Disp\IfEnd \If C=39 \Then " ":\Locate 1,1,"Table of values" " ":\Locate 1,2,"n from 1 to" ?\->\R End \SumDispOn:\aRanType "AR^(\R n-1)"\->\R an "BS^(\R n-1)"\->\R bn 1\->\R Start A\->\R a1:B\->\R b1 A/R\->\R a0:B/S\->\R b0 \R SelOn \R an \If R\<>S \Then \R SelOn \R bn \Else \R SelOff \R bn \IfEnd \DispR-Tbl\Disp\IfEnd \If C=29 \Then 0\->C \Locate 1,2,"Tn=a.r^(n-1)" \Locate 2,3,"a=" \Locate 4,3,A \Locate 2,4,"r=" \Locate 4,4,R \Locate 1,6,"Tn=b.r^n" \Locate 2,7,"b=" \Locate 4,7,A/R\Disp\ClrText \Locate 1,2,"Recursive" \Locate 1,3,"\R an1=r.\R an" \Locate 1,3,"T" \Locate 8,3,"T" \Locate 3,4,"\R a1=" \Locate 3,4,"T" \Locate 6,4,A \Locate 4,6,"r=" \Locate 6,6,R \If R+S=0 \Then \Locate 11,7,"2nd soln..."\Disp\ClrText \Locate 1,2,"2nd solution" \Locate 1,3,"Tn=a.r^(n-1)" \Locate 2,4,"a=" \Locate 4,4,B \Locate 2,5,"r=" \Locate 4,5,S \Locate 1,6,"Tn=b.r^n" \Locate 2,7,"b=" \Locate 4,7,B/S\Disp\ClrText \Locate 1,2,"Recursive" \Locate 1,3,"\R an1=r.\R an" \Locate 1,3,"T" \Locate 8,3,"T" \Locate 3,4,"\R a1=" \Locate 3,4,"T" \Locate 6,4,B \Locate 4,6,"r=" \Locate 6,6,S\Disp\Else \Locate 1,7,""\Disp\IfEnd \IfEnd \If C=46 \Then " ":\Locate 1,1,"\Sum to infinity":" " \If \Abs R\>=1 \Then \Locate 1,2,"does not exist" \Else \Locate 1,2,"Sinf=" A/(1-R)\->T \Locate 6,2,T B/(1-S)\->U \If T\<>U \Then " ":\Locate 3,3,"\or" \Locate 6,3,U \IfEnd \IfEnd \Locate 1,1,""\Disp\IfEnd \If C=1 \Then \Locate 1,2,"Unable to calculate!" \Locate 1,4,"Solution may exist.." \Locate 1,5,"Check using Table"\Disp\IfEnd \LpWhile C\<>47 \ClrText "\Done" %End %Header Record Format:TXT Communication SW:0 Data Type:PG Capacity:617 File Name:GTHDECAY Group Name: Password: Option1:NL Option2: Option3: Option4: %Data Record \Do:\ClrText:" ":\Locate 1,1,"How many points (\>=2)":?\->N:\LpWhile N<2 " ":\Locate 1,4,"Enter each pair:" \Seq(0,X,1,N,1)\->\List 5 \List 5\->\List 6 \For 1\->I \To N:"x"?\->\List 5[I]:"y"?\->\List 6[I]:\Next \ExpReg \List5,\List6,1 \Ra\->A:\e^x\Rb\->R:100(R-1)\->P \ClrText \Locate 1,2,"y=ar^x" \Locate 1,3,"a=" \Locate 3,3,A \Locate 1,4,"r=" \Locate 3,4,R \Fix 4 \If P>0 \Then \Locate 1,6,P \Locate 8,6," Pcent growth"\Disp\Else \Locate 1,6,\(-)P \Locate 8,6," Pcent decay"\Disp\IfEnd \Norm \ClrText \Locate 1,2,"Recursive" \Locate 1,3,"\R an1=r.\R an" \Locate 1,3,"T" \Locate 8,3,"T" \Locate 3,4,"\R a0=" \Locate 3,4,"T" \Locate 6,4,A \Locate 4,6,"r=" \Locate 6,6,R\Disp\Do \ClrText \Locate 1,2,"Predict?" \Locate 2,4,"F1: y from x" \Locate 2,5,"F2: x from y" \Locate 2,6,"F6: End" \Do:\Getkey\->C:\LpWhile C=0 \ClrText \If C=79:\Then "x="?\->X:"y=":A*R^X\Disp\IfEnd \If C=69:\Then "y="?\->Y:"x=" \If Y>0 \Then \In (Y/A)/\In R\Disp\Else "\Not possible"\Disp\IfEnd \IfEnd \LpWhile C=79\ Or C=69 \ClrText %End %Header Record Format:TXT Communication SW:0 Data Type:PG Capacity:571 File Name:LINEAR Group Name: Password: Option1:NL Option2: Option3: Option4: %Data Record \ClrText " ":" ":" " \Locate 1,1,"Eqn of straight line" \Locate 1,2,"Type 1:m \and point" \Locate 6,3,"2:2 points" ?\->A \If A\<>1:\Then 2\->A:\IfEnd \If A=1 \Then "m="?\->D \Else "Point (p,q)":"p="?\->P "q="?\->Q \IfEnd "Point (x,y)":"x="?\->X "y="?\->Y \If A=2\ And X=P \Then \(-)X\->D:0\->B:1\->A \Else \If A=2:\Then (Y-Q)\ab/c(X-P)\->D:\IfEnd 1\->V:1\->Q:0\->P:0\->W:0\->N \If D<0:\Then 1\->N:\IfEnd \Abs D\->D:D\->S \Do \Intg S\->I S-I\->R IV+P\->T IW+Q\->B \If R\<>0:\Then 1/R\->S:\IfEnd V\->P:W\->Q:T\->V:B\->W \LpWhile \Abs (T/B-D)>\EE\(-)10 \If N:\Then \(-)T\->T:\IfEnd T\ab/cB\->M Y-M*X\->C \ClrText \Locate 1,2,"y=mx+c" \Locate 1,3,"m=" \Locate 3,3,M \Locate 1,4,"c=" \Locate 3,4,C\Disp\If BM<0:\Then \(-)B\->B:\IfEnd BM\->A:BC\->D:\(-)B\->B \IfEnd \ClrText \Locate 1,2,"ax+by+d=0" \Locate 1,3,"a=" \Locate 3,3,A \Locate 1,4,"b=" \Locate 3,4,B \Locate 1,5,"d=" \Locate 3,5,D\Disp\ClrText "\Done" %End %Header Record Format:TXT Communication SW:0 Data Type:PG Capacity:1767 File Name:MAV Group Name: Password: Option1:NL Option2: Option3: Option4: %Data Record \ClrText " ":\Locate 1,1,"Moving averages" \@F776 \Dim \List 2\->N \List 1[2]-\List 1[1]\->W \For 3\->I \To N \If \List 1[I]-\List 1[I-1]\<>W \Then \ClrText \Locate 1,1,"ERROR!" \Locate 1,2,"Check \List 1: values" \Locate 1,3,"must go up unif\ormly" \Stop \IfEnd \Next " ":\Locate 1,2,"How many points":?\->P \If P\>=N \Then \ClrText \Locate 1,2,"Insufficient data!" \Locate 1,3,"Program finished." \Stop \IfEnd \Locate 3,7,"Finding averages..." .5\->E \Int (\Frac (P/2)+.5)\<>0\=>1\->E \Int (P/2)\->L 1+L\->F N-L\->Q 2L\->L \Seq(0,X,1,N,1)\->\List 3 \List 3\->\List 4 \List 3\->\List 5 \List 3\->\List 6 \For 1\->I \To (N-L) E(\List 2[I]+\List 2[I+L])\->S \For (I+1)\->J \To (I+L-1) \List 2[J]+S\->S \Next I+(L/2)\->K S/P\->\List 3[K] \List 2[K]-\List 3[K]\->\List 4[K] \Next \For F\->I \To Q 1\->\List 5[I] \Next \S-WindMan \ViewWindow \Min(\List 1),\Max(\List 1),(\Xmax-\Xmin)/4,\Min(\List 2),\Max(\List 2),(\Ymax-\Ymin)/4 \S-Gph1 \DrawOn,\xyLine,\List 1,\List 2,1,\Cross,\Blue \S-Gph2 \DrawOn,\Scatter,\List 1,\List 3,\List 5,\Square,\Orange \S-Gph3 \DrawOn,\Linear,\List 1,\List 3,\List 5,\Green \DrawStat\Disp\S-WindAuto \LinearReg \List 1,\List 3,\List 5\Disp\Ra\->A:\Rb\->B:\Cor\->R \ClrText \If NN \List 6\->\List 5 \Do:\LpWhile \Getkey\<>31 \Else \Locate 2,7,"Averaging residuals..." \For 1\->J \To N 0\->T:0\->S F+\Int (P\Frac ((J+P-F)/P)+.5)\->M \For M\->I \To Q \Step P \List 4[I]+S\->S 1+T\->T \Next S/T\->\List 5[J] \List 2[J]-\List 5[J]\->\List 6[J] \Next \Do \ClrText \Locate 1,1,"Predict values?" \Locate 7,3,"F1: Yes" \Locate 7,4,"F5: No" \Locate 7,5,"F6: Quit" \Do:\Getkey\->E:\LpWhile E=0 \If E=29 \Then \ClrText \Stop \IfEnd \If E=79 \Then \ClrText " ":\Locate 1,1,"x value":?\->X \ClrText \Locate 10,1,"x=" \Locate 12,1,X X\->V (X-\List 1[1])/W+1\->X \If \Int X\<>X \Then \Int (X+.5)\->X W(X-1)+\List 1[1]\->V \Locate 4,2,"Using x=" \Locate 12,2,V \IfEnd \RaV+\Rb\->Y \Locate 10,3,"y=" \Locate 12,3,Y \While X\<=0:X+P\->X:\WhileEnd \While X>P:X-P\->X:\WhileEnd \Locate 1,4,"Seas Comp =" \Locate 12,4,\List 5[X] \Locate 1,5,"Future Val=" \Locate 12,5,Y+\List 5[X] \Locate 14,7,"[EXE]..." \Do:\LpWhile \Getkey\<>31 \IfEnd \LpWhile E=79 \IfEnd \ClrText \Locate 1,1,"Lists now contain" \Locate 2,2,"3: Mov Avs" \Locate 2,3,"4: R\Residuals" \If N\<>0 \Then \Locate 2,4,"5: Av residuals" \Locate 2,5,"6: Seas adjusted" \IfEnd \Locate 14,7,"[EXE]..." \Do:\LpWhile \Getkey\<>31 \ClrText \Locate 1,1,"Finished" \Locate 1,2,"Again...... EXE" \Locate 1,3,"See Lists.. MENU,4" \Locate 1,4,"End........ AC\slashON" \For 1\->I \To 5 \Locate 1,6," " \Locate 1,7," " \Locate 1,6,"Warning:use y=ax+b" \Locate 1,7,"from this prog ONLY" \Next %End %Header Record Format:TXT Communication SW:0 Data Type:PG Capacity:902 File Name:NUMSEQS Group Name: Password: Option1: Option2: Option3: Option4: %Data Record \ClrText:" ":" ":" ":" ":" " \Locate 1,1,"1.Fibonacci" \Locate 1,2,"2.Prime" \Locate 1,3,"3.\Square" \Locate 1,4,"4.Triangle" \Locate 1,5,"Choice:":?\->S \If S=1 \Then \Do \ClrText " ":\Locate 1,1,"Fibonacci sequence" " ":\Locate 1,2,"First N terms" " ":\Locate 1,3,"N (5 - 50)" ?\->N \LpWhile N<5\ Or N>50 \Locate 15,7,"wait..." 1\->A:1\->B \Seq(1,X,1,N,1)\->\List 1 \For 3\->I \To N A+B\->C C\->\List 1[I] B\->A:C\->B \Next \IfEnd \If S=2 \Then \Do \ClrText " ":\Locate 1,1,"Prime numbers" " ":\Locate 1,2,"between 2 \and N" " ":\Locate 1,3,"N (5 - 1613)" ?\->N \LpWhile N<5\ Or N>1613 \Locate 1,6,"Calc time (s):" \Locate 16,6,\Int (.046N^1.14) \Locate 15,7,"wait..." [[2,3,5]]\->\Mat A \For 7\->I \To N \Step 2 0\->J:1\->P \Do \Isz J \Mat A[1,J]\->A \Frac (I/A)=0\=>0\->P \LpWhile P\ And A<\sqrtI P\=>\Augment(\Mat A,[[I]])\->\Mat A \Next \Trn \Mat A\->\Mat A \Mat->List\Mat A,1)\->\List 1 \IfEnd \If S=3 \Then \Do \ClrText " ":\Locate 1,1,"\Square numbers" " ":\Locate 1,2,"From 1st to Nth" " ":\Locate 1,3,"N (5 - 250)" ?\->N \LpWhile N<5\ Or N>250 \Locate 15,7,"wait..." \Seq(X\x^2,X,1,N,1)\->\List 1 \IfEnd \If S=4 \Then \Do \ClrText " ":\Locate 1,1,"Triangle numbers" " ":\Locate 1,2,"from 1st to Nth" " ":\Locate 1,3,"N (5 - 250)" ?\->N \LpWhile N<5\ Or N>250 \Locate 15,7,"wait..." \Seq(.5X(X+1),X,1,N,1)\->\List 1 \IfEnd \List 1\Disp\ClrText %End %Header Record Format:TXT Communication SW:0 Data Type:PG Capacity:1153 File Name:REPAY Group Name: Password: Option1:NL Option2: Option3: Option4: %Data Record \Norm \ClrText "Loan Amount"?\->A "\Int Rate PA"?\->R "Repayment"?\->P "Repayments\slashyear"?\->N R/N/100\->S 1+S\->R \If R>1\ And P+A-AR>0 \Then \Int (\log (P/(P+A-AR))/\log R+1)\->L \Else \If R=1 \Then \Int (A/P+1)\->L \Else \Locate 1,6,"Bad values-loan never" \Locate 1,7,"paid off! Finished." \Stop \IfEnd \IfEnd A\->B:L\->D:P\->G \Do G\->P:D\->L:B\->A \ClrText \Locate 1,1,"Choose:" \Locate 2,3,"F1: One row" \Locate 2,4,"F2: All rows - " \Locate 17,4,L \Locate 2,6,"F6: Quit" \Do:\Getkey\->C:\LpWhile C=0 \ClrText:" " \If C=69 \Then \Locate 1,1,"0 of rows" \Locate 8,1,L \If L>255 \Then "Max of 255 repaymentsProgram will show 1st255 only" 255\->L \IfEnd \ClrList \Seq(0,X,1,L,1)\->\List 1 \List 1\->\List 2 \List 2\->\List 3 \List 3\->\List 4 \Fill(P,\List 3) A\->\List 1[1] 0\->T \For 1\->I \To L \Locate 1,1,I SA\->U:T+U\->T U\->\List 2[I] A\->E:RA-P\->A A\->\List 4[I] A>0\ And I<255\=>A\->\List 1[I+1] \Next \Int (100(P+A)+.5)/100\->\List 3[L] 0\->\List 4[L] \Int (100T+.5)/100\->T \Locate 1,3,"Tot Int=" \Locate 9,3,T \Locate 1,4,"Tot Rep=" \Locate 9,4,B+T \Locate 1,6,"See Lists f\or w\orking" \Locate 1,7,"Rounding..." \Int (100\List 1+.5)/100\->\List 1 \Int (100\List 2+.5)/100\->\List 2 \Int (100\List 4+.5)/100\->\List 4 \IfEnd \If C=79 \Then \Locate 1,1,"Which row: 1 to" \Locate 17,1,L ?\->L \If L<1\ Or L>D \Then \ClrText "\Not possible"\Disp\Else \If S=0 \Then B-G*(L-1)\->E \Else BR^(L-1)-G*(R^(L-1)-1)/S\->E \IfEnd SE\->F E+F-G\->H \If H<0 \Then H+G\->P 0\->H \IfEnd \ClrText \Locate 3,2,"ROW:" \Locate 8,2,L \Fix 2 \Locate 1,4,"Start:" \Locate 8,4,E \Locate 3,5,"Int:+" \Locate 8,5,F \Locate 1,6,"Repay:-" \Locate 8,6,P \Locate 8,7,H \Norm \Locate 3,7,"End:"\Disp\IfEnd \IfEnd \LpWhile C=79 \Locate 1,7,"Finished " %End %Header Record Format:TXT Communication SW:0 Data Type:PG Capacity:1060 File Name:SAVING Group Name: Password: Option1: Option2: Option3: Option4: %Data Record \Norm \ClrText "First Deposit"?\->A "Payment"?\->P "Payments\slashyear"?\->N "\Int Rate (pa)"?\->R R/N/100\->S 1+S\->R A\->B:L\->D:P\->G \Do G\->P:D\->L:B\->A \ClrText \Locate 1,1,"Choose:" \Locate 2,3,"F1: One row" \Locate 2,4,"F2: Many rows" \Locate 2,6,"F6: Quit" \Do:\Getkey\->C:\LpWhile C=0 \If C=69 \Then \Do \ClrText:" " \Locate 1,1,"First row" ?\->J " ":\Locate 1,4,"Last row: to" \Locate 11,4,J \Locate 19,4,J+254 ?\->K K-J+1\->L \LpWhile J<1\ Or L<1\ Or L>255 \ClrText \Locate 1,1,"Row of" \Locate 5,1,J \Locate 12,1,K \ClrList \Seq(X,X,J,K,1)\->\List 1 0\List 1\->\List 2 \List 2\->\List 3 \List 3\->\List 4 \List 4\->\List 5 \Fill(P,\List 4) \If S=0 \Then A+P*(J-1)\->A \Else AR^(J-1)+P*(R^(J-1)-1)/S\->A \IfEnd A\->\List 2[1] 0\->T \For 1\->I \To L \Locate 5,1,I+J-1 SA\->U:T+U\->T U\->\List 3[I] A\->E:RA+P\->A A\->\List 5[I] IA\->\List 2[I+1] \Next \Locate 1,3,"Total Int=" \Int (100T+.5)/100\->T \Locate 11,3,T \Locate 1,4,"Final Bal=" \Int (100A+.5)/100\->A \Locate 11,4,A \Locate 1,6,"See Stats f\or detail" \Locate 1,7,"Rounding..." \Int (100\List 2+.5)/100\->\List 2 \Int (100\List 3+.5)/100\->\List 3 \Int (100\List 5+.5)/100\->\List 5 \IfEnd \If C=79 \Then \ClrText:" " \Locate 1,1,"Which row" ?\->L \If L<1 \Then \ClrText "\Not possible"\Disp\Else \If S=0 \Then A+P*(L-1)\->E \Else AR^(L-1)+P*(R^(L-1)-1)/S\->E \IfEnd SE\->F E+F+G\->H \ClrText \Locate 3,2,"Row:" \Locate 8,2,L \Fix 2 \Locate 1,4,"Start:" \Locate 8,4,E \Locate 3,5,"Int:+" \Locate 8,5,F \Locate 3,6,"Pay:+" \Locate 8,6,P \Locate 8,7,H \Norm \Locate 3,7,"End:"\Disp\IfEnd \IfEnd \LpWhile C=79 \Locate 1,7,"Finished " %End