C++ · Variables, types and arithmetic

Mixing int and double

An average of whole numbers is rarely whole, and C++ decides whether to keep the fraction before it stores the answer.