Compute the area of a circle

image_pdfimage_print

   
 
/*
C#: The Complete Reference 
by Herbert Schildt 

Publisher: Osborne/McGraw-Hill (March 8, 2002)
ISBN: 0072134852
*/
// Compute the area of a circle. 
  
using System;  
   
public class ComputeCircle {   
  static void Main() {   
    double radius; 
    double area; 
 
    radius = 10.0; 
    area = radius * radius * 3.1416; 
 
    Console.WriteLine("Area is " + area); 
  }   
}

           
         
     


This entry was posted in Data Types. Bookmark the permalink.