CalculateSurface() public method

public CalculateSurface ( ) : double
return double
Ejemplo n.º 1
0
 public static void Main()
 {
     Triangle triangle = new Triangle(4, 5);
     Console.WriteLine(triangle.CalculateSurface());
     var rectangle = new Rectangle(3, 5);
     Console.WriteLine(rectangle.CalculateSurface());
     var circle = new Circle(4);
     Console.WriteLine("{0:F2}", circle.CalculateSurface());
 }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            Triangle  tr     = new Triangle(1, 3);
            Rectangle rect   = new Rectangle(2, 2);
            Circle    circle = new Circle(3);

            Console.WriteLine(tr.CalculateSurface());
            Console.WriteLine(rect.CalculateSurface());
            Console.WriteLine(circle.CalculateSurface());
        }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            Triangle tr = new Triangle(1, 3);
            Rectangle rect = new Rectangle(2, 2);
            Circle circle = new Circle(3);

            Console.WriteLine(tr.CalculateSurface());
            Console.WriteLine(rect.CalculateSurface());
            Console.WriteLine(circle.CalculateSurface());
        }