Professional Documents
Culture Documents
1st 2
2nd 7
3rd 6
4th 5
5th 4
6th 3
7th 2
Table 2: Example:
To compute the letter of NRIC No. 8512345: Step (a) & (b): (8 * 2) + (5 * 7) + (1 * 6) + (2 * 5) + (3 * 4) + (4 * 3) + (5 * 2) = 16 + 35 + 6 + 10 + 12 + 12 + 10 = 101 Step (c): 101 /11 = 9 remainder 2 Step (d): 11 2 = 9 Step (e): Alphabet is I from table 2.
Assumption: Assume that the user enter a 7-digit number followed by a letter. Filename: perl3_4.pl