Question
Create a function called v_vin in C programming language that checks for the validity of a vin number. The function accepts char *check as a
Create a function called v_vin in C programming language that checks for the validity of a vin number. The function accepts char *check as a paramater and it returns an int. Vin number is 17 characters. Here are the requirement:
- If the length of the input is more than 17 the program should return -100 - If the vin is not valid then it should return 100 - If the vin is valid then it should return 200
For example, the char "2C3CCAAG2DH535679" should return 200 because it's a valid vin number.
How does vin work: https://en.wikibooks.org/wiki/Vehicle_Identification_Numbers_(VIN_codes)/Check_digit
Function template
int v_vin(char *check){
}
Please write the function in C programming language and show me your though process pls
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started