(i) The code is a multiple of 9, so its digit sum is a multiple of 9: 9, 18, 27, …
All four digits are even, so their sum is even. That rules out 9 and 27.
The four different even digits are chosen from 0, 2, 4, 6, 8, so the largest possible sum is 8+6+4+2=20. That rules out 36 and above. The only possible digit sum is 18.
(ii) All five even digits add up to 0+2+4+6+8=20. A code uses four of them with sum 18, so the digit left out must be 20−18=2. The digits are 0, 4, 6 and 8.
- Smallest code: the first digit cannot be 0, so it is 4; then put the rest in increasing order: 4068.
- Largest code: put the digits in decreasing order: 8640.
Check: 4+0+6+8=18 and 4068=9×452; 8640=9×960.