Beispiel #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();
        }
Beispiel #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();
        }
Beispiel #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());
        }
Beispiel #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();
        }
Beispiel #5
0
 public string comparisontriangle(triangle othertriangle)
 {
     if (P() == othertriangle.P())
     {
         return("Трикутники рівні");
     }
     else
     {
         return("Трикутники не рівні");
     }
 }
Beispiel #6
0
 public triangle(triangle previoustriangle)
 {
     A = previoustriangle.A;
 }