Lesson 9: Division & double
A surprise in C#: when you divide two whole numbers, the result is cut to a whole number — 7 / 2 gives 3, not 3.5! The fraction is simply dropped. To get a fraction you need the double type (a number with a decimal point): 7.0 / 2 gives 3.5. In this lesson we'll learn when to divide with int and whe