PROGRAM SIMPSON Lbl 0 ClrHome Disp "CURRENT FUNCTION" Disp "IS STORED IN Y1" Disp "" Disp "ENTER N" Prompt N If N<=0 Goto 0 Lbl R Disp "ENTER TOP" Input B Disp "ENTER BOTTOM" Input A ClrHome If A>=B Then ClrHome Disp "TOP CANT BE <=" Disp "BOTTOM Disp "1,CONTINUE" Disp "2,RETRY" Disp "3,QUIT" Input L If L=2 Then ClrHome Goto R End If L=3 Stop End ((B-A)/N)-->C C-->F 0-->G 1-->K 0-->E 1-->D 1-->V Menu ("SHOW OUTPUT?","YES",Y,"NO",N) Lbl Y 1-->W Goto 1 Lbl N 0-->W Lbl 1 (C+A)-->X If K=5 2--K If K=0 4-->K If K=1 Then A-->X (Y1+E)-->E (C-F)-->C 0-->K End If K=4 Then ((4(Y1))+E)-->E If W=1 Output(V,1,"4*") 5-->K End If K=2 Then ((2(Y1))+E)-->E If W=1 Output(V,1,"2*") 4-->K End (C+F)-->C (G+1)-->G If W=1 Then Output(V,3,Y1) Output(V,16,"+") (V+1)-->V If D>=5 Then Output(V,1,"PRESS ENTER") Pause ClrHome 1-->D 1-->V End (1+D)-->D End If G>=N Goto 2 Goto 1 Lbl 2 (A+C)-->X (Y1+E)--E If W=1 Then (V+1)-->V Output(V,3,Y1) (V+1)-->V Output(V,1,"ALL *") (F/3)-->P Output(V,6,"P") End (E(F/3))-->E If W=1 Then (V+1)-->V Output(V,1,"PRESS ENTER") Pause End ClrHome Output(1,1,"AREA =") Output(2,1,E) Stop