LANGUAGE
Remainder operator %
Returns the remainder after division; for signed integral values a nonzero remainder has the dividend’s sign.
Formal Syntax & Structure
csharp syntaxcsharp
a % bWorking Example
Example Snippetcsharp
int leftover = -17 % 5; // -2