I need to write a robot to check if id number has a correct checksum.
Id number is in format 9 digits for example: 123456789. First 8 numbers are random and last number is calculated with formula ((1st-digit)*8 + (2nd-digit)*7 + (3rd-digit)*6 + … + (8th-digit)*1)Mod11. If the last numer is different then formula then we get “Wrong id number”.
I was trying to make a data table:
1st column: digits from checked id number
2nd column: fixed number used to multiply
3rd column: formula multiply value from 1st column with value from 2nd column
then Sum up all values from 3rd column and then mod11 results.
I am facing two main problems:
- how to put formula in data table (3rd column)
- how to combine two data table one with fixed values (2nd column) and other with variables (1st column)
Did any one had similar problem?