using System;
using System.Collections.Generic;
using System.Text;

namespace Accurate
{
    class Program
    {
        static void Main(string[] args)
        {
            double doubleValue1 = 5.1;
            double doubleValue2 = 0.8;
            double doubleResult = doubleValue1 + doubleValue2 - 5.9;
            Console.WriteLine("doubleResult {0}", doubleResult);
            decimal decimalValue1 = 5.1M;
            decimal decimalValue2 = 0.8M;
            decimal decimalResult = decimalValue1 + decimalValue2 - 5.9M;
            Console.WriteLine("decimal result: {0}", decimalResult);
        }
    }
}
