数字显示程序
20 INPUTA
30 S=0
40 E1=INT(A/1000):IF E1=0 THEN 70
50 ONE 1 GOTO 210,220,230,240,250,260,270,280,290
60 IFA>9999 THEN 20
70 S=10
80 E2=INT((A-E11000)/100):IF E1+32=0 THEN 100
90O NE 2 GOTO 210,220,230,240,250,260,270,280,290:GOTO 200
100 S=20
110 E3=INT((A-E11000-E2100)/10):IF E1+E2+E3=0 THEN 130
120 ONE 3 GOTO 210,220,230,240,250,260,270,280,290:GOTO 200
130 S=30
140 E4=INT((A-E11000-E2100-E310)/1):IF E1+E2+E3+E4=0 THEN GOTO 330
150 ONE 4 GOTO 210,220,230,240,250,260,270,280,290:GOTO 200
200 VLIN 12,20 AT S:VLIN 22,30 AT S:HL INS+1,S+6 AT 11:HLIN S+1,S+6AT31:VLIN12,20 AT S+7:VL IN 22,30 AT S+7
205 GOTO 300
210 VL IN11,31 AT S+2
215 GOTO 300
220 PLOT S,12:HL IN S+1,S+6 AT 11:VLIN 12,20 AT S+7:HLIN S+1,S+6 AT 21:VLIN 22,31 AT S:HL IN S+1,S+7 AT 31:PLOT S+7,30
225 GOTO 300
230 PLOT S,12:HLIN S+1,S+6 AT 11:VLIN 12,20AT S+7:HL IN S+1,S+6 AT 21:VLIN 22,30 AT LOTS,30
235 GOTO 300
240 VLIN 11,20 ATS:HLINS,S+7AT21:VLIN 11,31ATS+6
245 GOTO 300
250 HLINS+1,S+7AT 12:VLIN 11,20ATS:HLINS,S+6AT21:VLIN 22,30ATS+7:HLINS+1,S+6AT31:PLOTS,30
255 GOTO 300
260 VLIN 12,20ATS:VLIN 22,30 ATS:HLIN S+1,S+6AT11:HLIN S+1,S+6AT21:HLIN S+1,S+6AT31:VLIN 22,30ATS+7:PLOTS+7,12
265 GOTO 300
270 HLIN S,S+7AT 11:VLIN 12,31ATS+7:PLOTS,12
275 GOTO 300
280 VLIN 12,20 AT S:VLIN 22,30 AT S:HLIN S+1,S+6 AT 11:HLIN S+1,S+6 AT 21:HLIN S+1,S+6 AT 31:VLIN 12,20 AT S+7:VLIN 22,30 AT S+7
285 GOTO 300
290 VLIN 12,20 AT S:PLOT S,30:HLIN S+1,S+6 AT 11:HLIN S+1,S+6 AT 21:HLIN S+1,S+6 AT 31:VLIN 12,20 AT S+7 VLIN 22,30 AT S+7
300 IF S=0 THEN 70
310 IF S=10 THEN 100
320 IF S=20 THEN 130
330 PRINTA
350 END
(江苏 龚莹莹)