Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- namespace Проект_4_3_Лаб
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void button2_Click(object sender, EventArgs e)
- {
- Close();
- }
- double storona (double a, double b, double c)
- {
- double p = (a + b + c) / 2d;
- return (2 * Math.Atan(Math.Sqrt(((p - a) * (p - b)) / p * (p - c))));
- }
- private void button1_Click(object sender, EventArgs e)
- {
- double a = Convert.ToDouble(textBox1.Text);
- double b = Convert.ToDouble(textBox2.Text);
- double c = Convert.ToDouble(textBox3.Text);
- double A = storona (c, b, a);
- double B = storona (c, a, b);
- double C = storona (a, b, c);
- textBox4.Text = Convert.ToString(A);
- textBox5.Text = Convert.ToString(B);
- textBox6.Text = Convert.ToString(C);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement