According to my calculator: (100-1) / 2 = 49.5
If I have an int like this:
int mid = (100 - 1) / 2
When performing integer division (by which we mean both arguments are integral types) C# will truncate the result; effectively rounding down for positive results.
If you want "standard" or midpoint rounding, you need to explicitly use
Math.Round and floating point division (at least one argument is