0
Check employee code if it is valid
Write a function âisValidEmpCodeLetterâ to check the last letter of the employee code is valid. Apply the following rules in sequence to check the last letter. âą Multiply each of the numbers with 2, 7, 6, 5, 4, 3 in sequence. âą Sum up the multiplication results âą Match the last digit of the sum with the letter in the table. âą Depending on the first letter, the employee code must have the corresponding letter in the table. The function returns a true if the format is right, else it returns false.
1 Réponse
0
Is anyone know what should be done?