Пример #1
0
        }   // end of - Promt(string a)

        // функциональный аналог текстбокса с лебелом - out double dbl
        static public void Promt(string a, out dim1 dim)
        {
            string str;
            double d;
            bool   result;

            if (divide_true == ' ')
            {
                divider();
            }
            Console.Write(a);
            do
            {
                str    = Console.ReadLine(); // читать строку !
                str    = str.Replace(divide_false, divide_true);
                result = Double.TryParse(str, out d);
                if (!result)
                {
                    Console.WriteLine("Input Error! Try Again!");
                    str = "";
                    d   = 0.0;
                }
            } while (!result);
            dim = new dim1(d);
        }   // end of - Promt(string a)
Пример #2
0
        }  // end of - AreaCircle()

        public static dim2 AreaRing(dim1 d_ex, dim1 d_in)
        {
            //
            return(Math.Pow(d_ex, 2) * PiDiv4 - Math.Pow(d_in, 2) * PiDiv4);
        }  // end of - AreaCircle()
Пример #3
0
        }  // end of - AreaRectangle()

        public static dim2 AreaRectangle(dim1 b_ex, dim1 h_ex)
        {
            return(b_ex * h_ex);
        }  // end of - AreaRectangle()
Пример #4
0
        }  // end of - AreaCircle()

        public static dim2 AreaCircle(dim1 d_ex)
        {
            //
            return(Math.Pow(d_ex, 2) * PiDiv4);
        }  // end of - AreaCircle()