Account Validation
An account number is composed of a quad (4 digits) followed by three triplets (3 digits each).
To validate the account number:
- For each of the first three components, calculate the sum of the digits.
- Extract the right-most digit of each sum.
- Total the right-most digits.
- Extract the right-most digit of the total.
- Check whether the right-most digit of the total equals the last digit of the account number.
touque.ca > Education Commons > Java > Code
[This page last updated 2020-12-23 at 12h11 Toronto local time.]
© 2007–2022 Hersch, Bear & Company Limited. All rights reserved. “Grammar Authority,” “grammarauthority.com,” “touque.ca,” and “Canada’s Thinking Cap” are trademarks of Hersch, Bear & Company Limited. All other trademarks and copyrights are the property of their respective owners.
Privacy Policy | Licence to Copy | How to cite | Contact us