SHARE
TWEET

Test123

a guest Apr 22nd, 2019 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. // Circle.css //
  3. public class Circle
  4.     {
  5.         private int radius;
  6.  
  7.         public Circle()
  8.         {
  9.             radius = 10;
  10.         }
  11.         public Circle(int initialRadius)
  12.         {
  13.             radius = initialRadius;
  14.             Console.WriteLine(radius);
  15.         }
  16.         public double Area()
  17.         {
  18.             return Math.PI * radius * radius;
  19.  
  20.         }
  21.  
  22.  
  23.     }
  24.  
  25.  
  26.  
  27. //  Program.cs
  28.  
  29.  
  30.    static void Main(string[] args)
  31.         {
  32.            
  33.             Circle MyCircle = new Circle(12);
  34.             double area = MyCircle.Area();
  35.  
  36.             Console.WriteLine(area);
  37.  
  38.             Console.ReadLine();
  39.         }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top