cs
using System;
namespace ConsoleApp1
{
class Rectangle
{
double length;
double width;
public Rectangle(double h, double w)
{
this.length = h;
this.width = w;
}
public double getarea()
{
return length * width;
}
}
class Program
{
static void Main(string[] args)
{
double w, h;
w = Convert.ToDouble(Console.ReadLine());
h = Convert.ToDouble(Console.ReadLine());
Rectangle R = new Rectangle(w, h);
Console.WriteLine("矩形面积为{0}", R.getarea());
Console.ReadLine();
}
}
}