If i add 2 double data type value, the result is round off and print.How do i get the exact output in double?
<p>I need to add double values and display it result. But the resulting value was wrong.</p>

<pre><code>class Program
{
    static void Main(string[] args)
    {
        int i = 4;
        double d = 4.0;
        string s = "HackerRank ";
        int i1 = 12;
        double d1 = 4.0;
        string s1 = "is the best place to learn and practice coding!";
        int sum = 0; string s2 = string.Empty;
        sum = sum+i + i1;
        s2 = s2 + s + s1;
        Console.WriteLine(sum);
        Console.WriteLine("{0}+{1}={2}",d,d1,(d+d1).ToString());
        Console.WriteLine(s2);
        Console.ReadLine();
    }
}
</code></pre>

<p><a href="https://i.stack.imgur.com/x2IU2.png" rel="nofollow">the output snapshot is here</a></p>

<p>My expected output is 4.0+4.0=8.0</p>

<p>But the output value is roundoff. Can anyone provide the reason and solution for this question?</p>