Skip to the task
Layout
Back to classic view

You are looking at lesson 2. Your place is still lesson 3, task 1: Conditions.

CHECKTask 14 of 23 · step 7: Drills: check yourself

What does it print? Division

Write your answer first, only then open the hint.

printf("%d %d %.1f\n", 7 / 2, 7 % 2, 7 / 2.0);
Stuck?

3 1 3.5. 7 / 2: two ints, so 3. 7 % 2: the remainder, 1. 7 / 2.0: one side is a double, so 3.5.