Videos
If x is your number, then what you're looking for is simply (10 - x).
edit One functional form that satisfies your updated spec is (x + y - (x * y) / 5.0). This is designed for values of x and y between 0 and 10.
X = 10 - Y where Y is input and X is output
0's opposite is 10: 10 = 10-0 1's opposite is 9: 9 = 10-1 2's opposite is 8: 8 = 10-2
It's called the additive inverse.
In a less technical context, you could just call them negatives of each other.
Similarly, 5 and 1/5 are multiplicative inverses.
This is hardly mainstream English, but there is a term.
The identity element under addition for the set of reals (or the set of integers) is zero;
x + 0 = 0 + x = x
The element that must be added to any element to give the identity element as the product (the general term for result of a binary operation; here the sum) is, for addition, known as the additive inverse of that element (number).