I finally did it finished the application this application uses three text boxes, one button, and three labels.
Tell me what you think of the code I do realize she is not very pretty so any ways to make what I did easier would be appreciated. But try not to ruin it to much it works and I was very excited for my first app.
CODE
//check to see if value null
while(sin.Text == "")
{//if it is tell the person
MessageBox.Show("always put in a value if value unknown input 0 I just did it for you this time though:)");
//input for them
sin.Text = ("0");
}
while(cos.Text == "")
{
MessageBox.Show("always put in a value if value unknown input 0 I just did it for you this time though:)");
cos.Text = ("0");
}
while(hypot.Text == "")
{
MessageBox.Show("always put in a value if value unknown input 0 I just did it for you this time though:)");
hypot.Text = ("0");
}
{
if (sin.Text != "")
{
sinresult.Text = ("");
}
else
if (cos.Text != "")
{
cosresult.Text = ("");
}
else
if (hypot.Text != "")
{
hypotresult.Text = ("");
}
if (Convert.ToDouble(sin.Text) == 0)
{//convert text to number
//call ints
double store;
double store2;
double store3;
store2 = Convert.ToDouble(hypot.Text);
store3 = Convert.ToDouble(cos.Text);
store = System.Math.Pow(store2, 2) - System.Math.Pow(store3, 2);//do math
store = System.Math.Sqrt(store);
//send results to label
sinresult.Text = Convert.ToString(store);
}
else
if (Convert.ToDouble(cos.Text) == 0)
{
double store4;
double store5;
double store6;
store4 = Convert.ToDouble(hypot.Text);
store5 = Convert.ToDouble(sin.Text);
store6 = System.Math.Pow(store4, 2) - System.Math.Pow(store5, 2);
store6 = System.Math.Sqrt(store6);
cosresult.Text = Convert.ToString(store6);
}
else
if (Convert.ToDouble(hypot.Text) == 0)
{
double store7;
double store8;
double store9;
store7 = Convert.ToDouble(sin.Text);
store8 = Convert.ToDouble(cos.Text);
store9 = Convert.ToDouble(System.Math.Pow(store7, 2) + System.Math.Pow(store8, 2));
store9 = System.Math.Sqrt(store9);
hypotresult.Text = Convert.ToString(store9);