Math.Sqrt(Math.Pow(NUDradi

Btw: I don't know what NUDradius is, but it sounds like something of the radius of a circle, are you sure that's the value you need? Shouldn't it be something like height / width of the rectangle/triangle?

Solved

Posted on 2009-02-21

Within my formula code, I cannot get my response to properly display the output of the Pythagorean theorem formula: a2 + b2 = c2. How do I properly code to get correct response?

```
Private Sub btnConvert_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnConvert.Click
If Theorem.Checked Then
'hypothenuse
txtOutput.Text = Math.Pow(NUDradius.Value, 2) + Math.Pow(NUDheight.Value, 2)
ElseIf Cylinder.Checked Then
'cylinder volume
txtOutput.Text = Math.Pow(NUDradius.Value, 2) * NUDheight.Value * Math.PI
End If
End Sub
```

2 Comments

Math.Sqrt(Math.Pow(NUDradi

Btw: I don't know what NUDradius is, but it sounds like something of the radius of a circle, are you sure that's the value you need? Shouldn't it be something like height / width of the rectangle/triangle?

By clicking you are agreeing to Experts Exchange's Terms of Use.

Title | # Comments | Views | Activity |
---|---|---|---|

fizzArray3 challenge | 1 | 47 | |

Visual studio community prompts to sign in and how to use without signing in\is there a different way to set up. | 7 | 67 | |

Using YubiKey with REST API application | 2 | 52 | |

bunnyEars challenge | 6 | 45 |

Join the community of 500,000 technology professionals and ask your questions.

Connect with top rated Experts

**22** Experts available now in Live!