Advertisement
Guest User

Untitled

a guest
Apr 22nd, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. using System;
  2.  
  3. namespace ConsoleApp2
  4. {
  5.  
  6. public class Circle
  7. {
  8. private int radius;
  9. Circle MyCircle = new Circle;
  10. double Area = MyCircle.Area();
  11.  
  12. public Circle()
  13. {
  14. radius = 10;
  15. }
  16.  
  17. public Circle(int initialRadius)
  18. {
  19. radius = initialRadius;
  20. }
  21.  
  22.  
  23. public double Area()
  24. {
  25. return Math.PI * radius * radius;
  26. }
  27.  
  28.  
  29.  
  30. }
  31.  
  32.  
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement