Background: When you rent a car from an agency, the key ring has several pieces of information: license plate, make and year of car, and usually a special code. This code could be used for some data processing within the company's computers. This lab will practice determining that special car rental code from the license plate.
Assignment:
The following sequence of steps will be used to convert a sample license plate into a car rental code.
a. A license plate consists of 3 letters followed by a space, followed by a 3-digit integer. For example, CPR 607.
b. Add up the ASCII values of the 3 letters, 67 + 80 + 82 = 229.
c. Add the sum of the letters to the 3-digit integer. For example, 229 + 607 = 836.
d. Take this sum (836) and determine the integer remainder after dividing by 26: 836 % 26 = 4.
e. Determine the 4th letter in the alphabet after the letter 'A': 4th letter after 'A' = 'E'
f. Combine the letter and the sum. Thus, we have CPR 607 = E836.