namespace 圆的面积计算
{
public abstract class mm
{
public double r, x;
public abstract void mianji(int r);
}
public class A : mm
{
public override void mianji(int r)
{
x = Convert.ToDouble(r * r * 3.14);
Console.WriteLine("圆的面积为",+x );
}
}
class Program
{
static void Main(string[] args)
{
Console .WriteLine ("请输入半径:");
int R= Convert .ToInt32 (Console .ReadLine ());
A a = new A();
a.mianji(R);
Console.ReadLine();
}
}