Ejemplo n.º 1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            ClassRoot root = new ClassRoot();
            double    d    = root.root(Convert.ToDouble(textPow.Text.Replace(".", ",")), Convert.ToDouble(textNumber.Text.Replace(".", ",")), Convert.ToDouble(textAcc.Text.Replace(".", ",")));

            labelRslt.Content = d.ToString();


            d = root.chk(Convert.ToDouble(textPow.Text.Replace(".", ",")), Convert.ToDouble(textNumber.Text.Replace(".", ",")), Convert.ToDouble(textAcc.Text.Replace(".", ",")));
            labelChk.Content = d.ToString();
        }
Ejemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            ClassRoot root = new ClassRoot();
            double    d    = root.root(Convert.ToDouble(textPow.Text.Replace(".", ",")), Convert.ToDouble(textNumber.Text.Replace(".", ",")), Convert.ToDouble(textAccuracy.Text.Replace(".", ",")));

            labelResult.Text    = d.ToString();
            labelResult.Visible = true;

            d                = root.chk(Convert.ToDouble(textPow.Text.Replace(".", ",")), Convert.ToDouble(textNumber.Text.Replace(".", ",")), Convert.ToDouble(textAccuracy.Text.Replace(".", ",")));
            labelChk.Text    = d.ToString();
            labelChk.Visible = true;
        }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            ClassRoot root = new ClassRoot();

            Console.WriteLine("enter number");
            double number = Convert.ToDouble(Console.ReadLine().Replace(".", ","));

            Console.WriteLine("enter pow");
            double pow = Convert.ToDouble(Console.ReadLine().Replace(".", ","));

            Console.WriteLine("enter accuracy");
            double accuracy = Convert.ToDouble(Console.ReadLine().Replace(".", ","));

            double rt = root.root(pow, number, accuracy);

            Console.WriteLine(rt);
            double chk = root.chk(pow, number, accuracy);

            Console.WriteLine(chk);
            Console.ReadLine();
        }