This is how I want it to work,

It must have 10 input boxes for me to input the numbers, each box contains two numbers, input numbers will be from 1 to 37

After I have input the numbers into the 10 input boxes, it will generate a 10x10 grid of numbers by using this mathematics calculation method,

For example, if I have input 12 and 27 into the first input box, it will calculate it as 27-12 = 15, if the answer is positive then always leave it as it is

If the answer is negative for example, if I input 36 and 19, it will calculate it as 19-36 = -17, the answer is negative so it will need to add 37 to the answer which will be -17+37 = 20, so 20 will be the final answer

For example in the screenshot, 21-15 = 6, the answer 6 will be placed in S1 column and 19 - 6 = 13, the answer 13 will be placed in S2 column, it's always the bottom number minus the top number

In the screenshot, I only showed 5 boxes of input numbers and 5 columns so it doesn't confuse you, but once it's finished, it will have 10 input boxes and 10 columns