05-30-2015, 01:16 PM
The programme takes a nine digit string from the stack & returns the original string & the ISBN check character.
eg for input
"019530818"
the programme returns
"019530818"
2
eg for input
"019530818"
the programme returns
"019530818"
2
Code:
::
CK1&Dispatch
BINT3
::
DUPLEN$
BINT9
#=
NcaseSIZEERR
BINT0
BINT10
ONE_DO
OVER
ISTOP-INDEX
SUB$1#
BINT48
#-
INDEX@
#1+
#*
#+
LOOP
BINT11
#/
DROP
DUP#0=csedrp
Z0_
BINT11
SWAP#-
BINT10
#=casedrop
'IDX
FPTR2 ^#>Z
;
;