Dear All



I want to perform some calculation on the values entered by user in form. the form is based on a table. this table has a text field named conb length 10 digit. I want to perform the following algorithm on this field.

1-Taking starting 9 digit and add 1 to each digit.
2-Multiplying alternate digit with 2
3- If value > 10 subtract 9
4- Add all the numbers
5-Divide resultant by 10
6-subtractt remainder from 9

For example:

7 6 0 4 0 0 7 8 9
1 1 1 1 1 1 1 1 1
-------------------
8 7 1 5 1 1 8 9 10
2 2 2 2 2
---------------------
167 2 5 2 1 16 9 20
-9 -9 -9
-----------------------
7 7 2 5 2 1 7 9 11

7+7+2+5+2+1+7+9+11 =51

51/10 =5 , Remainder = 1

9 - 1 = 8 (Check Digit)

Now this check digit should compare with the 10th digit of conb entered by user.

I just now to calculate the remainder. Please help me how to calculate the remainder?


Thanks in advance for any help.

Wasim