# I am a 56 year old programmer.  I am working on a program t

I am a 56 year old programmer. I am working on a program that needs me to convert a linear position into its respective 9×9 (0 based [8,8]) array position. For example: position 8 might be defined like this: [ n = linear position, x = first array position, y = second array position ]x = (n / 8) -1 : row = (8 / 8) -1 = 0 correcty = n – (8 * x) : col = 8 – (8 * 0) = 8 correctx = (22 /8) – 1 : row = (3) rounded up -1 = 2 correcty = 22 – (8 *2) col = 22 – 16 = 6 correctThese formulas work until the number n gets larger and x and y are forced to be larger than the arrayCan you help me determine what I am doing wrong. Your help would be appreciated.