Visual C++ - Additive inverse: -
Operator negative sign is used to change the sign of expressions. it works as a negation: if the expression value is positive then the result will be negative, and if the expression is negative then the result will be positive.-
Description
- expression
Input
- expression - Any number
Output
- Result - Numbers
Examples
Visual C++ .NET
Additive inverse the possible of use:xmin = -32768; ymax = 32767;
short x= -1234; // x = -1234
short y = -(1500 % 60);// y = -25
y = (short)(x * y); // z = 30850
Visual C++ .NET
Other pieces of example codes: x= -12345
x= -5
x= -82345
You can find it in the following collections: arithmetic operators
Additive inverse in another programming language: