Compute the area of a circle with 'double' : Double Calculation : Data Type C# Examples


C# Examples » Data Type » Double Calculation »

 

Compute the area of a circle with 'double'









    
using  System;    
      
class  Circle  {      
    public  static  void  Main()  {      
        double  radius;  
        double  area;  
  
        radius  =  10.0;  
        area  =  radius  *  radius  *  3.1416;  
  
        Console.WriteLine("Area  is  "  +  area);  
    }      
}
    
   
  
   



Output

Area is 314.16


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Data Type
» Double Calculation