C# How to calculate first 10 numbers out a bill number of 12?

Posted by Sef on Stack Overflow See other posts from Stack Overflow or by Sef
Published on 2010-03-31T12:04:45Z Indexed on 2010/03/31 12:13 UTC
Read the original article Hit count: 277

Filed under:

Hello,

Lets assume i have a bill number that has 12 numbers: 823 45678912

My question is how exactly do i do calculations with the first 10 numbers?

To verify if a given in billnumber is correct i have to perform the following calculation:

(first 10 numbers) % 97 = result

And if the result of the calculation is the same as the last 2 numbers of my bill number, then it is verified.

Thanks in advance.

© Stack Overflow or respective owner

Related posts about c#