Пример #1
0
        public string Volumn()
        {
            Circlie c      = new Circlie(SID, R);
            double  volumn = Convert.ToSingle(c.Area()) * H;

            return(Convert.ToString(volumn));
        }
Пример #2
0
 static int Main(string[] args)
 {
     Circlie c1 = new Circlie("圆", 1);
     Console.WriteLine(c1.SID + "的面积是:" + c1.Area());
     Cyliner c2 = new Cyliner("圆柱体", 1, 2);
     Console.WriteLine(c2.SID + "的体积是:" + c2.Volumn());
     return 0;
 }
Пример #3
0
        static int Main(string[] args)
        {
            Circlie c1 = new Circlie("圆", 1);

            Console.WriteLine(c1.SID + "的面积是:" + c1.Area());
            Cyliner c2 = new Cyliner("圆柱体", 1, 2);

            Console.WriteLine(c2.SID + "的体积是:" + c2.Volumn());
            return(0);
        }
Пример #4
0
 public string Volumn()
 {
     Circlie c = new Circlie(SID, R);
     double volumn = Convert.ToSingle(c.Area()) * H;
     return Convert.ToString(volumn);
 }