This is not what you understand above, 24 and 5 are both plastic, so the result is plastic, there will be no decimal, that is, it will not be transformed as you said. If 24/5.0 is used, the result will be 4.8.
First of all, you need to know the operation priority, () "(-,++),)" *,/"=
According to the above priority, (-y/++x) = 24/5 = 4; After execution, y = 24, z = 5, y and z are used for this calculation.
Then use z =1* z-= 4 * 2 = 8; Z takes 2 when executing this part, and z- 1 after executing this statement.
So the final result is z = 8-1= 7;
When it is this sentence: a = z = (-y/++x) * z-; The above results are the same, except that a = z = 8;;
After that, it is not a- 1, but z- 1, so you output a and z later, and the result is 8,7.
# contains "stdio.h"
# include & ltiostream.h & gt
Master ()
{int x=4,y=25,z=2,a;
a = z =(-y/+++x)* z-;
cout & lt& lta & lt& ltz & lt& ltendl
The output result is 87.