static void Main(string[] args) { int l, b, w, h; Console.WriteLine("Enter length and breadth of a rectangle"); l = Convert.ToInt32(Console.ReadLine()); b = Convert.ToInt32(Console.ReadLine()); Rectangle r = new Rectangle(l, b); r.display(); r.area(); Console.WriteLine("Enter base and height of a triangle"); w = Convert.ToInt32(Console.ReadLine()); h = Convert.ToInt32(Console.ReadLine()); Triangle t = new Triangle(w, h); t.display(); t.area(); }