Пример #1
0
        private void btnForca_Click(object sender, EventArgs e)
        {
            c1 = double.Parse(txtValor1.Text);
            c2 = double.Parse(txtValor2.Text);

            Forca calc = new Forca();

            calc.forcar(c1, c2);

            MessageBox.Show("F=m*a\n" + c1 + " x " + c2 + " =\n F=" + calc.f + " N");
        }
Пример #2
0
        private void btnForca_Click(object sender, EventArgs e)
        {
            double m, a;

            m = double.Parse(txtValor1.Text);
            a = double.Parse(txtValor2.Text);

            //instanciando o método da classe Forca.cs
            Forca f1 = new Forca();

            f1.forcar(m, a);

            MessageBox.Show(" f " + " = " + f1.f);
        }