I'm doing multiplication and division of float
s and int
s and I forget the implicit conversion rules (and the words in the question seem too vague to google more quickly than asking here).
If I have two int
s, but I want to do floating-point division, do I need only to cast one or both of the operands? How about for multiplication — if I multiply a float
and an int
, is the answer a float
?