10
20 INPUT?79,z%
30 MODE5:VDU28;31,19,8
40 !80=&5800:!84=&6901:A%=&7F:X%=79:Y%=0:CALL&FFF1:IF?(?84+86)THENSTOP
50 FORt%=0TOz%-1:FORs%=0TO9
60 !(&4800+s%*4)=&1000000+t%+(t%*7+s%)MOD10*65536:NEXT
70 !80=&4800:!84=&15006305:?86=t%:!88=&1E10002A:CALL&FFF1
80 IF?(?84+86)THENPRINT~t%" ";~?(?84+86)" FORMAT ERROR!":STOP
90 IFt%=0THENFORs%=&4800TO&49FCSTEP4:!s%=0:NEXT:s%=z%*10:?&4907=s%:?&4906=s%DIV256:!84=&4B03:!88=&1E22:CALL&FFF1:IF?(?84+86)THENPRINT~t%" ";~?(?84+86)" WRITE ERROR!":STOP
100 !84=&5F03:?86=t%:!88=&1E2A:CALL&FFF1:IF?(?84+86)THENPRINT~t%" ";~?(?84+86)
110 NEXT