The Ministry of Home Affairs and Immigration would like to introduce an automated id number and passport generation system. The system takes into consideration the following: a) To generate the id number it takes two last digits from the Year of birth, two digits for the month of birth plus two digits for the date of birth, then finally adds a five-digit postfix number. b) To generate the passport is similar, the system takes the first part from the id number with the year, month and date then it adds the "P-NAM" prefix and finally adds the last two digits from the id number's five-digit postfix number Your task is to create a program that can achieve the above requirements when given the person's first name, date of birth(format YYYY-MM-DD) and five-digit postfix through CMD arguements
The Ministry of Home Affairs and Immigration would like to introduce an automated id number and passport generation system. The system takes into consideration the following:
a) To generate the id number it takes two last digits from the Year of birth, two digits for the month of birth plus two digits for the date of birth, then finally adds a five-digit postfix number.
b) To generate the passport is similar, the system takes the first part from the id number with the year, month and date then it adds the "P-NAM" prefix and finally adds the last two digits from the id number's five-digit postfix number
Your task is to create a
Step by step
Solved in 4 steps with 2 images