Input: 15 , Output: 5, Input: 9, Output: -1. What would be the rule now ?

Answer:
Subtract 10
Step-by-step explanation:
The first option, "take the ones digit", is obviously incorrect because the ones digit of 9 is not -1. The second one is incorrect because you are dividing by 2 and then adding 5. Dividing odd numbers by 2 will give you a decimal and a decimal plus an integer (the integer is 5 in this case) will still be a decimal (provided that the decimal is not an integer as well). However, both of the outputs are integers, so we know that the second one is wrong. The third one is wrong as well because 9 / 3 = 3, not -1. The last one is correct because 15 - 10 = 5 and 9 - 10 = -1.