If statement in Windows Form

I have pretty much no clue what I'm doing because I was sick last class and my professor offers little to no help. He would like us to make a Windows form with 3 four text boxes and one button that displays whether three side lengths form a right triangle.

Obviously, he would like to create a formula with an if, else statement that displays "This is a right triangle!" if it satisfies the Pythagorean Theorem. If it doesn't satisfy the Pythag Theorem, it should say, "This is not a right triangle!"

I'll show my code below with the understanding that it is very wrong.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
   {
	double a = Convert::ToDouble(textBox1->Text);
	 double b = Convert::ToDouble(textBox2->Text);
	 double c = Convert::ToDouble(textBox3->Text);
				
				double d = Math::Pow(a,2);
				double e = Math::Pow(b,2);
				double f = Math::Pow(c,2);
	if( d+e=c)

{ textBox4->Text="This is a right triangle!".ToString();}
				 else
 {  
	textBox->Text="This is not a right triangle!".ToString();
				 
				 }
Topic archived. No new replies allowed.