doubles and arithmetic operators : Double Calculation : Data Type C# Examples


C# Examples » Data Type » Double Calculation »

 

doubles and arithmetic operators









    
class  MainClass
{

    public  static  void  Main()
    {
    
        System.Console.WriteLine("10d  /  3d  =  "  +  10d  /  3d);
        System.Console.WriteLine("10.0  /  3.0  =  "  +  10.0  /  3.0);
        double  doubleValue1  =  10;
        double  doubleValue2  =  3;
        System.Console.WriteLine("doubleValue1  /  doubleValue2  =  "  +  doubleValue1  /  doubleValue2);

    }
}
    
   
  
   



Output

10d / 3d = 3.33333333333333
10.0 / 3.0 = 3.33333333333333
doubleValue1 / doubleValue2 = 3.33333333333333


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Data Type
» Double Calculation