(12C) Luhn algorithm
|
04-25-2018, 07:22 AM
(This post was last modified: 04-25-2018 07:23 AM by Dieter.)
Post: #7
|
|||
|
|||
RE: (12C) Luhn algorithm
(04-24-2018 08:27 PM)pinkman Wrote: There is another way to avoid the >9 test: add the 2 numbers, even if there is a leading zero. It can also be done with the >9 test. Here is a version that processes the complete number, so you don't have to press R/S several times: Code: 01 1 R1 is returned in Y and R0 in X. Simply check if the last digit is zero. Yes, with a few more steps the program could also do this. The code up to line 28 works like the previous versions, so it's even one step shorter. And R2 is not required. ;-) Dieter |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
(12C) Luhn algorithm - pinkman - 04-18-2018, 06:29 PM
RE: (12C) Luhn algorithm - Dieter - 04-23-2018, 08:19 AM
RE: (12C) Luhn algorithm - pinkman - 04-24-2018, 08:00 AM
RE: (12C) Luhn algorithm - Dieter - 04-24-2018, 06:35 PM
RE: (12C) Luhn algorithm - Dieter - 04-24-2018, 07:40 PM
RE: (12C) Luhn algorithm - pinkman - 04-24-2018, 08:27 PM
RE: (12C) Luhn algorithm - Dieter - 04-25-2018 07:22 AM
RE: (12C) Luhn algorithm - pinkman - 04-25-2018, 02:52 PM
|
User(s) browsing this thread: 2 Guest(s)