main函数怎么调用方法,输出三角形,长方形,圆的面积
using System;using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
class shape
{
public double Area(double x, double y, double z)
{
double q;
q = (x + y + z) / 2;
return (System.Math.Sqrt(q * (q - x) * (q - y) * (q - z)));
}
public double Area(double m, double n)
{
return (2.1 * 2.3);
}
public double Area(double r)
{
return (3.1415 * r * r);
}
public double Area(double r, double h)
{
return (3.1415 * r * h);
}
}
static void Main(string[] args)
{
}
}
}