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.Threading.Tasks;
- using System.Windows.Forms;
- namespace WindowsFormsApp1
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void Form1_Load(object sender, EventArgs e)
- {
- }
- private void button1_Click(object sender, EventArgs e)
- {
- string texta = textBox1.Text;
- string textb = textBox6.Text;
- int a = Convert.ToInt32(texta);
- int b = Convert.ToInt32(textb);
- int c = a * a + b * b;
- double wynikc = Math.Sqrt(c);
- string wynik = Convert.ToString(wynikc);
- MessageBox.Show(wynik);
- }
- private void button2_Click(object sender, EventArgs e)
- {
- string textc = textBox2.Text;
- string texta = textBox5.Text;
- int c = Convert.ToInt32(textc);
- int a = Convert.ToInt32(texta);
- int b = c * c - a * a;
- double wynikb = Math.Sqrt(b);
- string wynik = Convert.ToString(wynikb);
- MessageBox.Show(wynik);
- }
- private void button3_Click(object sender, EventArgs e)
- {
- string textc = textBox3.Text;
- string textb = textBox4.Text;
- int c = Convert.ToInt32(textc);
- int b = Convert.ToInt32(textb);
- int a = c * c - b * b;
- double wynika = Math.Sqrt(a);
- string wynik = Convert.ToString(wynika);
- MessageBox.Show(wynik);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement