Advertisement
Guest User

NeYasno

a guest
Mar 24th, 2020
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.74 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Drawing;
  5. using System.Data;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10.  
  11. namespace Laba2
  12. {
  13.     public partial class UserControl1: UserControl
  14.     {
  15.         public UserControl1()
  16.         {
  17.             InitializeComponent();
  18.         }
  19.  
  20.         private void Label1_Click(object sender, EventArgs e)
  21.         {
  22.  
  23.         }
  24.  
  25.         private void Label2_Click(object sender, EventArgs e)
  26.         {
  27.  
  28.         }
  29.  
  30.         private void Button1_Click(object sender, EventArgs e)
  31.         {
  32.             double x = double.Parse(textBox1.Text);
  33.             textBox4.Text += Environment.NewLine + "X = " + x.ToString();
  34.             double y = double.Parse(textBox2.Text);
  35.             textBox4.Text += Environment.NewLine + "Y = " + y.ToString();
  36.             double z = double.Parse(textBox3.Text);
  37.             textBox4.Text += Environment.NewLine + "Z = " + z.ToString();
  38.             double a = Math.Sqrt(10d*(Math.Pow(x, 1.0/3.0)+ Math.Pow(x, (y+2.0))));
  39.             double b = (Math.Pow(Math.Asin(z), 2.0) - Math.Abs(x - y));
  40.  
  41.             double c = a*b;
  42.             textBox4.Text += Environment.NewLine + "Результат U = " + c.ToString();
  43.  
  44.         }
  45.  
  46.         private void Label4_Click(object sender, EventArgs e)
  47.         {
  48.            
  49.         }
  50.  
  51.         private void UserControl1_Load(object sender, EventArgs e)
  52.         {
  53.             textBox4.Multiline = true;
  54.             textBox1.Text = "0,01655";
  55.             textBox2.Text = "-2,75";
  56.             textBox3.Text = "0,15";
  57.         }
  58.  
  59.         private void TextBox3_TextChanged(object sender, EventArgs e)
  60.         {
  61.  
  62.         }
  63.     }
  64. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement