SAP Ariba Interview Question

Write an algorithm to Convert Numbers to Letters. Create a function, which takes an integer number as input and return letter. For Example 1 = A, 2 = B, 3 = C, ........... 25 = Y, 26, Z, 27 = AA,..... 51 = AY, 52 = AZ, 53 = BA, ......