Mark Wickens

5 ONERRORGOTO900
10 ANGLE1:MODE8:DIM:l=0:r=0:c$=CHR$(5):n$="(lr-rĀ²sin(l/r))/2"
50 m$=n$+"     l:arc":s$="l":z=l:GOSUB500:l=z
80 m$=n$+"     r:radius":s$="r":z=r:GOSUB500:IFz<l/2/PI THEN80 ELSEr=z
100 LOCATE0,1:PRINTc$;"Area =";(l*r-r^2*SIN(l/r))/2;:z$=INPUT$(1,@):GOTO50
300 LOCATE0,1:PRINTc$;"not found";:z$=INPUT$(1,@):GOTO50
500 CLS:PRINTm$;
510 LOCATE0,1:PRINTc$;s$;"=";z;"?";:INPUT@42;z:LOCATE0,0:IFz=<0 THEN500 ELSERETURN
900 IFERR=1 THENCLS:ONERRORGOTO0
910 IFERL=510 THENRESUME510
920 RESUME300