Arithmetic Operators
+ - * / % work as usual. Integer division drops the fraction.
Example
int a = 7, b = 2;
Console.WriteLine(a / b);
Console.WriteLine(a % b);
Console.WriteLine((double)a / b);
a++;
Console.WriteLine(a);Exercise
Remainder.
7 2
Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.