I have two decimal values which are 865 and 720. I subtract the two, divide by 10, then round the result. Why is this coming to 14 instead of 15 when the value needing to be rounded is 14.5?
Here's the code:
public decimal CalculateExpoDollars(decimal previousYearActual, decimal goal, decimal currentYearActual)
{
if (currentYearActual < goal && currentYearActual >= previousYearActual)
return 0.00m;
return Math.Round((currentYearActual - previousYearActual) / 10);
}