How to use only the decimal points in a computation?
I am creating a form in which a somewhat complicated computation is needed to come up with 3 "codes".
There are 14 total digits per code.
1 digit varies in the type of code (0,1,2), 7 digits of which is set/always the same, 5 digits (Item #) will be provided by the user, and the LAST digit will have to be computed by the form.
The last digit will have to be computed like this:
- Add the digits in the odd-numbered positions (first, third, fifth, etc.) together and multiply by three.
- Add the digits in the even-numbered positions (second, fourth, sixth, etc.) to the result.
- Take the remainder of the result divided by 10 (modulo operation). If the remainder is equal to 0 then use 0 as the LAST digit, and if not 0 use the remainder as a whole number and subtract from 10 to derive the LAST digit.
Sample Calculated Answers:
Item # - 11000 - provided by user
Code 1 - 000 35794 11000 0
Code 2 - 100 35794 11000 7
Code 3 - 200 35794 11000 4
So to compute Code 1: 000 35794 11000 0
- Add the odd number digits: 0+0+5+9+1+0+0 = 15.
- Multiply the result by 3: 15 × 3 = 45.
- Add the even number digits: 0+3+7+4+1+0 = 15.
- Add the two results together: 45 + 15 = 60.
- 60/10 = 6 (no remainder so the last digit is 0)
So to compute Code 2: 100 35794 11000 7
- Add the odd number digits: 1+0+5+9+1+0+0 = 16.
- Multiply the result by 3: 16 × 3 = 48.
- Add the even number digits: 0+3+7+4+1+0 = 15.
- Add the two results together: 48 + 15 = 63.
- 63/10 = 6.3 (3 is the remainder) 10-3 = 7
My question is, how do I do this calculation in adobe pdf?
Thank you in advance.

