Exemplo n.º 1
0
        private void button3_Click(object sender, EventArgs e)
        {
            triangle t1 = new triangle(Convert.ToDouble(textBox1.Text), Convert.ToDouble(textBox2.Text));
            double   t2 = Convert.ToDouble(textBox7.Text);
            triangle s  = t1 * t2;

            textBox6.Text = s.TRG_intput_output().ToString();
        }
Exemplo n.º 2
0
        private void button2_Click(object sender, EventArgs e)
        {
            Random   rnd = new Random();
            triangle t1  = new triangle(Convert.ToDouble(textBox1.Text), Convert.ToDouble(textBox2.Text));
            triangle t2  = new triangle(Convert.ToDouble(rnd.Next(1, 10)), Convert.ToDouble(rnd.Next(1, 10)));

            textBox5.Text = t2.comparisontriangle(t1).ToString();
        }
Exemplo n.º 3
0
        private void button1_Click(object sender, EventArgs e)
        {
            triangle tr = new triangle(Convert.ToDouble(textBox1.Text), Convert.ToDouble(textBox2.Text));

            textBox3.Text = Convert.ToString(tr.S());

            textBox4.Text = Convert.ToString(tr.P());
        }
Exemplo n.º 4
0
        private void button5_Click(object sender, EventArgs e)
        {
            Random   rnd = new Random();
            triangle t1  = new triangle(Convert.ToDouble(textBox1.Text), Convert.ToDouble(textBox2.Text));
            triangle t2  = new triangle(Convert.ToDouble(rnd.Next(1, 10)), Convert.ToDouble(rnd.Next(1, 10)));
            triangle s   = t1 + t2;

            textBox7.Text = s.TRG_intput_output().ToString();
        }
Exemplo n.º 5
0
 public string comparisontriangle(triangle othertriangle)
 {
     if (P() == othertriangle.P())
     {
         return("Трикутники рівні");
     }
     else
     {
         return("Трикутники не рівні");
     }
 }
Exemplo n.º 6
0
 public triangle(triangle previoustriangle)
 {
     A = previoustriangle.A;
 }