Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace RR
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void button1_Click(object sender, EventArgs e)
- {
- double result = (Convert.ToInt32(textBox1.Text) + Convert.ToInt32(textBox2.Text) + Convert.ToInt32(textBox3.Text)) / 3;
- textBox4.Text = Convert.ToString(result);
- }
- private void button2_Click(object sender, EventArgs e)
- {
- /* double result2 = Math.Sqrt(Math.Pow((Convert.ToDouble(textBox1.Text)), 2) + Math.Pow((Convert.ToDouble(textBox1.Text)), 2) + Math.Pow((Convert.ToDouble(textBox1.Text)), 2)); */
- double result2 = Math.Sqrt(Math.Pow(Convert.ToDouble(textBox1.Text), 2) + Math.Pow(Convert.ToDouble(textBox2.Text), 2) + Math.Pow(Convert.ToDouble(textBox3.Text), 2));
- textBox5.Text = Convert.ToString(result2);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement