using System;
public abstract class Shape
{
public abstract double CalculateArea();
}
public class Rectangle : Shape
private double length;
private double width;
public Rectangle (double length, double width) // конструктор
this.length = length;
this.width = width;
public override double CalculateArea()
return length * width;
public class Program
public static void Main()