Home > Article > Backend Development > What does x+=x-=x*x mean in C language
In C language, x =x-=x*x
In C language, x =x-=x*x is a compound assignment statement, which Equivalent to the following two statements:
<code class="C">x = x + x; x = x - (x * x);</code>
Execution steps:
Equivalent expression:
Application scenarios:
This compound assignment statement is usually used to shorten the code length, and in some specific scenarios It can improve code efficiency, for example:
The above is the detailed content of What does x+=x-=x*x mean in C language. For more information, please follow other related articles on the PHP Chinese website!