C language, integer and floating-point operations, the result is floating-point, why do I get plastic, for example, thank you, teacher.
Your understanding is only half right. To be exact, the value of expression 2.5*0.9*a is indeed floating-point. But the key point is: when assigning a floating-point type value to an integer variable, a type conversion occurs, that is, the value of the floating-point type on the left is converted into an integer value according to the principle of "rounding to zero"! ( ̄▽ ̄)"