Skip to content

Glossary: C# Basics

Remainder (%)

Also written: %, modulo

The `%` operator gives what is left after dividing, so `7 % 2` is 1. It is handy for tests like every 10th drink being free.

Where the book teaches it

Related terms

Integer division