The rule (for the types we have presented so far) is that if an operator has an operand of type double, we use floating-point arithmetic yielding a double result; otherwise, we use integer arithmetic yielding an int result. For example:
Cpp
my conspect of the Stroustrup C++ book. + additional C++ topics.