All pastes #293172 Raw Edit

Untitled

public text v1 · immutable
#293172 ·published 2006-12-27 07:36 UTC
rendered paste body
The following sequence of steps will be used to convert a license plate into a car rental code. 
A license plate consists of 3 letters followed by a 3 digit integer value.
Type in the license plate information as 3 characters followed by a single integer value. For example, CPR 607.
Add up the ASCII values of the 3 letters, 67 + 80 + 82 = 229.
Add the sum of the letters to the single integer value. For example, 229 + 607 = 836.
Take this sum (836) and determine the integer remainder after dividing by 26: 
 836 % 26 = 4. 
Determine the 4th letter in the alphabet after the letter 'A': 4th letter after 'A' = E.
Combine the letter and the sum, the car id number for license plate 
 CPR 607 = E836.
You may assume that all sample data will be in the format of 3 alphabet characters, then a space, followed by a 3 digit integer.