using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WindowsFormsСигаева2ИС_ПР2
{
///
/// Класс Calculation для вычисления выражения
///
public partial class Calculation : Form
{
///
/// Конструктор
///
public Calculation()
{
InitializeComponent();
}
///
/// Кнопка для вычисления выражения
///
///
///
private void ButtonCalculation_Click(object sender, EventArgs e)
{
if
(double.TryParse(textBoxA.Text, out double a) &&
double.TryParse(textBoxX.Text, out double x) &&
double.TryParse(textBoxC.Text, out double c) &&
double.TryParse(textBoxD.Text, out double d))
{
double f = Math.Sqrt((c - d) * (Math.Pow(x, 2))) / x;
double q = Math.Log((Math.Pow(x, 2)) + c) / ((0.7 * x) + (a*d));
double n = (Math.Pow(10, -2)) / (c - (d * Math.Pow(x, 3)));
double result = f + q + n;
textBoxResult.Text += Environment.NewLine + result.ToString();
}
}
}
}