BANKCKSM for the TI-85 Validate bank routing code checksum. Program: BANKCKSM Author: John P. Powers (jpp@cpdvax.csc.ti.com) Date: April 14, 1993 This program validates the nine-digit routing code of a bank. The OCR codes printed along the bottom of your checks and deposit slips include a nine-digit code used to speed checks through the clearing house to your bank. The last digit of the routing code is a check digit. Execute BANKCKSM to begin the program. The program then prompts for the nine-digit bank routing code. The program then displays either OK if the routing code checksum is good, or Bad check if the checksum is invalid. For example, bank routing code 218001435. BANKCKSM Enter bank routing code (9 digits) ?218001435 OK Done The bank routing code is good. The program begins by breaking the routing code up into a list of nine digits. The digits are multiplied in sequence by three, seven, and one and them summed up. If the units digit of the sum is zero, then the checksum is good and the routing code is valid. Demonstration on the above example. 2 1 8 0 0 1 4 3 5 * 3 7 1 3 7 1 3 7 1 ---------------------------- 6 7 8 0 0 1 12 21 5 sum=60 The last digit of 60 is zero, so the routing code is valid.