Advertisement
vencinachev

cirlceclass

Feb 2nd, 2021
855
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.57 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace SoftuniSv
  8. {
  9.     class Circle
  10.     {
  11.         public Point center;
  12.         public double radius;
  13.  
  14.         public double Area()
  15.         {
  16.             return Math.PI * Math.Pow(radius, 2);
  17.         }
  18.  
  19.         public double Perimeter()
  20.         {
  21.             return 2 * Math.PI * radius;
  22.         }
  23.  
  24.         public void Print()
  25.         {
  26.             Console.WriteLine($"Circle: (({center.x}, {center.y}), {radius})");
  27.         }
  28.     }
  29. }
  30.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement