Rem By Patrik Jansson 1/9 1996 FreeWare Rem Out going mess Print "Enter an EAN13-cods first 12 digits:" Rem We need two... Dim SUM(2) Rem Input 12 numbers Do Input NUM$ Rem 12? Exit If Len(NUM$)=12 Rem Sorry... Print "ERROR!" Loop Rem lets add those odd and even numbers together! Do For E=1 To 2 Inc D Add SUM(E),Val(Mid$(NUM$,D,1)) If D=>Len(NUM$) Then Exit 2 Next Loop Rem the secret is even*3+odd and what ever remains to the next 10 is the Rem checksum CHSUM=SUM(1)+SUM(2)*3 CHSUM=10-Val(Right$(Str$(CHSUM),1)) Rem reveal the secret Print "Checksum digit is:";CHSUM