Question: VIN numbers. A VIN number is a 1 7 - character string that uniquely identifies a motor vehicle. It also encodes the manufacturer and attributes
VIN numbers. A VIN number is a character string that uniquely identifies a motor
vehicle. It also encodes the manufacturer and attributes of the vehicle. To guard
against accidentally entering an incorrect VIN number, the VIN number incorporates
a check digit the th character Each letter and number is assigned a value
between and The check digit is chosen so to be the weighted sum of the values
mod using the symbol X if the remainder is
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
st nd rd th th th th th th
For example the check digit of the partial VIN number FACPELF is X
because the weighted sum is and mod is
F A C P E X L F
Write a program that takes a string and determines whether or not it is a valid VIN
number. Allow the input to be entered with upper or lower case, and allow dashes to
be inserted.
Do thorough error checking, eg that the string is the right length, that no illegal
characters are used I O Q etc.
With a working example please.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
