(float)(a+b)/2 Floating-point types are divided by shaping, including implicit type conversion, which is upward conversion. When plastic and floating-point operations are performed, plastic should be automatically converted into floating-point operations, and the result is floating-point.
int a=2,b = 3; (floating point) (a+b)/2=2.5