Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

integer division

Dividing two whole numbers, which drops the fraction.

When both operands of / are integers, the result is the quotient truncated toward zero; % gives the remainder.

Examples

  • 7 / 2 is 3 and 7 % 2 is 1; write 7 / 2.0 to get 3.5.

Read the full section →