[SAMPLE30] SAMPLE


100 cls
110 ON KEY GOSUB *SINSUB,*COSSUB,*endsub
120 for i=1 to 3
130 key(i) on
140 next i
150 deg=0:pi=3.1416:flag=1
160 ? "f・1またはf・2を押して下さい(f・3で終了)。"
170 *start
180 th=deg/180*pi
190 locate 0,10
200 on flag goto *sinc,*cosc
210 *sinc:? "TH=";deg;tab(12);"sin(TH)=";sin(th);:goto *exit
220 *cosc:? "TH=";deg;tab(35);"cos(TH)=";cos(th);:goto *exit
230 *exit:deg=deg+10
240 for i=0 to 1000:next
250 locate 0,10:?string$(70," ");
260 goto *start
270 *sinsub:flag=1:return
280 *cossub:flag=2:return
290 *endsub:key off:end