%Header Record Format:TXT Communication SW:0 Data Type:PG Capacity:3105 File Name:QUADFCTR Group Name: Password: Option1:NL Option2: Option3: Option4: %Data Record \ClrText "FACTOR AX\x^2+BX+C" \Lbl 0 "ENTER INTEGER VALUES WITH A\<>0" "A="?\->A "B="?\->B "C="?\->C \Int A\<>A\ Or \Int B\<>B\ Or \Int C\<>C\ Or A=0\=>\Goto0 B=0\ And C=0\=>\Goto0 1\->F \Abs A\->M B\<>0\ And \Abs B\Abs B\->M C\<>0\ And \Abs C\Abs C\->M \If M\>=2 \Then \For 2\->I \To M \Frac (\Abs A/I)+\Frac (\Abs B/I)+\Frac (\Abs C/I)=0\=>I\->F \Next \IfEnd A<0\=>-F\->F A/F\->G B/F\->H C/F\->I 1\->R 0\->S C=0\=>\Goto1 \If B=0 \Then \If \Frac (\sqrtG)=0 \Then \sqrtG\->D \Else S+1\->S 1\->N \While G\>=N\x^2 \Frac (G/N\x^2)=0\=>N\->K \Isz N \WhileEnd G/K\x^2\->T K\->D \IfEnd I>0\=>0\->R I<0\=>-I\->I \If \Frac (\sqrtI)=0 \Then \sqrtI\->E \Else S+2\->S 1\->N \While I\>=N\x^2 \Frac (I/N\x^2)=0\=>N\->K \Isz N \WhileEnd I/K\x^2\->U K\->E \IfEnd \Goto1 \IfEnd -H\ab/c(2G)\->E H\x^2-4GI\->D \If D<0 \Then 0\->R -D\->D \IfEnd \If \Frac (\sqrtD)=0 \Then 1\->S (\sqrtD)\ab/c(2G)\->D \Else 0\->S 1\->N \While D\>=N\x^2 \Frac (D/N\x^2)=0\=>N\->K \Isz N \WhileEnd D/K\x^2\->T K\ab/c(2G)\->D \IfEnd \If R=1\ And S=1 \Then E+D\->P E-D\->Q \IfEnd 0\->K 1\->M 1\->W G>1\=>\Int (G/2)\->M \For 1\->N \To M \If \Frac (G/N)=0 \Then G/N\->J \If R=1\ And S=1 \Then \Int (NP)=NP\ And \Int (JQ)=JQ\=>N\->K \Int (JP)=JP\ And \Int (NQ)=NQ\=>J\->K \Else \Int (NE)=NE\ And \Int (ND)=ND\ And \Int (JE)=JE\ And \Int (JD)=JD\=>N\->K \IfEnd \IfEnd \Next K\<>0\=>G/K\->J K=0\=>0\->W \If W=0 \Then A\->F 1\->K \While \Abs (\Int (KE)-KE)>1\EE-6 \Isz K \WhileEnd KE\->E 1\->J \While \Abs (\Int (JD)-JD)>1\EE-6 \Isz J \WhileEnd JD\->D \IfEnd \Lbl 1 \ClrText 1\->Z \Int (\log (\Abs A))+(A<0)+(\Abs A\<>1)+1\->L \Locate 1,Z,A \Locate L,Z,"X\x^2+" B<0\=>\Locate L+2,Z,"-" \If B\<>0 \Then \Locate L+3,Z,\Abs B L+\Int (\log (\Abs B))+(\Abs B\<>1)+3\->L \Locate L,Z,"X+" \Else L+1\->L \IfEnd C<0\=>\Locate L+1,Z,"-" \If C\<>0 \Then \Locate L+2,Z,\Abs C L+\Int (\log (\Abs C))+3\->L \Locate L,Z,"=" \Else \Locate L+1,Z,"=" \IfEnd Z+2\->Z \Locate 1,Z,F \Int (\log (\Abs F))+(F<0)+(\Abs F\<>1)+1\->L \If C=0 \Then \Locate L,Z,"X(" \Locate L+2,Z,G L+\Int (\log (\Abs G))+(\Abs G\<>1)+2\->L \Locate L,Z,"X+" H<0\=>\Locate L+1,Z,"-" \Locate L+2,Z,\Abs H L+\Int (\log (\Abs H))+3\->L \Locate L,Z,")" \Goto2 \IfEnd \Locate L,Z,"(" \If B=0 \Then \Locate L+1,Z,D L+\Int (\log D)+(D\<>1)+1\->L \If S=1\ Or S=3 \Then \Locate L,Z,"\sqrt" \Locate L+1,Z,T L+\Int (\log T)+2\->L \IfEnd \Locate L,Z,"X+" \Locate L+2,Z,E L+\Int (\log E)+(E\<>1)+2\->L \If R=0 \Then \Locate L,Z,"\{i}" L+1\->L \IfEnd \If S=2\ Or S=3 \Then \Locate L,Z,"\sqrt" \Locate L+1,Z,U L+\Int (\log U)+2\->L \IfEnd \Locate L,Z,")(" \Locate L+2,Z,D L+\Int (\log D)+(D\<>1)+2\->L \If L\>=18 \Then \Isz Z 1\->L \IfEnd \If S=1\ Or S=3 \Then \Locate L,Z,"\sqrt" \Locate L+1,Z,T L+\Int (\log T)+2\->L \IfEnd \If L\>=18 \Then \Isz Z 1\->L \IfEnd \Locate L,Z,"X-" \Locate L+2,Z,E L+\Int (\log E)+(E\<>1)+2\->L \If L\>=18 \Then \Isz Z 1\->L \IfEnd \If R=0 \Then \Locate L,Z,"\{i}" L+1\->L \IfEnd \If S=2\ Or S=3 \Then \Locate L,Z,"\sqrt" \Locate L+1,Z,U L+\Int (\log U)+2\->L \IfEnd \If L\>=18 \Then \Isz Z 1\->L \IfEnd \Locate L,Z,")" \Goto2 \IfEnd \If W=1 \Then \Locate L+1,Z,K L+\Int (\log K)+(K\<>1)+1\->L \Else \Isz L \IfEnd \Locate L,Z,"X-" L+2\->L \If R=1\ And S=1 \Then P<0\=>\Locate L-1,Z,"+" \Abs (KP)\->O \Int (\log O)+1\->M \If L+M>22 \Then \Isz Z 1\->L \IfEnd \Locate L,Z,O L+M\->L \If L\>=21 \Then \Isz Z 1\->L \IfEnd \Locate L,Z,")(" L+2\->L \Int (\log J)+(J\<>1)\->M \If L+M>22 \Then \Isz Z 1\->L \IfEnd \Locate L,Z,J L+M\->L \If L\>=21 \Then \Isz Z 1\->L \IfEnd \Locate L,Z,"X-" L+2\->L Q<0\=>\Locate L-1,Z,"+" \Abs (JQ)\->O \Int (\log O)+1\->M \If L+M>22 \Then \Isz Z 1\->L \IfEnd \Locate L,Z,O L+M\->L \If L\>=22 \Then \Isz Z 1\->L \IfEnd \Locate L,Z,")" \Else E<0\=>\Locate L-1,Z,"+" \Abs (KE)\->O W=0\=>\Abs E\->O \Int (\log O)+1\->M \If L+M>22 \Then \Isz Z 1\->L \IfEnd \Locate L,Z,O L+M\->L \If L\>=21 \Then \Isz Z 1\->L \IfEnd \If W=0 \Then \Locate L,Z,"\slash" \Isz L \Int (\log K)+1\->M \If L+M>21 \Then \Isz Z 1\->L \IfEnd \Locate L,Z,K L+M\->L \IfEnd \Locate L,Z,"-" \Isz L \Abs (KD)\->O W=0\=>\Abs D\->O \Int (\log O)+(O\<>1)\->M \If L+M>22 \Then \Isz Z 1\->L \IfEnd \Locate L,Z,O L+M\->L \If L\>=22 \Then \Isz Z 1\->L \IfEnd \If R=0 \Then \Locate L,Z,"\{i}" \Isz L \IfEnd \If L\>=18 \Then \Isz Z 1\->L \IfEnd \If S=0 \Then \Locate L,Z,"\sqrt" \Locate L+1,Z,T L+\Int (\log T)+2\->L \IfEnd \If W=0 \Then \Locate L,Z,"\slash" \Isz L \Int (\log J)+1\->M \If L+M>21 \Then \Isz Z 1\->L \IfEnd \Locate L,Z,J L+M\->L \IfEnd \If L\>=20 \Then \Isz Z 1\->L \IfEnd \Locate L,Z,")(" L+2\->L \If W=1 \Then \Int (\log J)+(J\<>1)\->M \If L+M>21 \Then \Isz Z 1\->L \IfEnd \Locate L,Z,J L+M\->L \IfEnd \If L\>=21 \Then \Isz Z 1\->L \IfEnd \Locate L,Z,"X-" L+2\->L E<0\=>\Locate L-1,Z,"+" \Abs (JE)\->O W=0\=>\Abs E\->O \Int (\log O)+1\->M \If L+M>22 \Then \Isz Z 1\->L \IfEnd \Locate L,Z,O L+M\->L \If L\>=22 \Then \Isz Z 1\->L \IfEnd \If W=0 \Then \Locate L,Z,"\slash" \Isz L \Int (\log K)+1\->M \If L+M>21 \Then \Isz Z 1\->L \IfEnd \Locate L,Z,K L+M\->L \IfEnd \Locate L,Z,"+" \Isz L \Abs (JD)\->O W=0\=>\Abs D\->O \Int (\log O)+(O\<>1)\->M \If L+M>21 \Then \Isz Z 1\->L \IfEnd \Locate L,Z,O L+M\->L \If L\>=22 \Then \Isz Z 1\->L \IfEnd \If R=0 \Then \Locate L,Z,"\{i}" L+1\->L \IfEnd \If L\>=18 \Then \Isz Z 1\->L \IfEnd \If S=0 \Then \Locate L,Z,"\sqrt" \Locate L+1,Z,T L+\Int (\log T)+2\->L \IfEnd \If W=0 \Then \Locate L,Z,"\slash" \Isz L \Int (\log J)+1\->M \If L+M>21 \Then \Isz Z 1\->L \IfEnd \Locate L,Z,J L+M\->L \IfEnd \If L\>=21 \Then \Isz Z 1\->L \IfEnd \Locate L,Z,")" \IfEnd \Lbl 2 \Locate 17,7,"DONE" %End