Exemplo n.º 1
0
        static void Main(string[] args)
        {
            rectangle rectangle = new rectangle(23.21, 23.23);

            rectangle.getArea();
            circle circle = new circle(23.12);

            circle.getArea();
            Console.WriteLine("area of rectangle is" + rectangle.getArea());
            Console.WriteLine("area of circle is" + circle.getArea());
            Console.ReadLine();
        }
Exemplo n.º 2
0
    public static void Main()
    {
        rectangle r1 = new rectangle(10, 20);

        r1.getArea();
        triangle t1 = new triangle(30, 40);
    }