Re: Help squaring a variable
Once again, you have not explained what the problem is. We are not your debuggers. Take some time and explain exactly what is going wrong instead of throwing some code at us and saying "make it work".
Re: Help squaring a variable
The program is made to tell you all the info of a circle by only putting in the area,radius,circumference or diameter
The problem is here:
double RTA = (double)Math.Pow(number1, 2) * pi;
I wrote this afterwad and it worked:
private void button2_Click(object sender, EventArgs e)
{
decimal number = Convert.ToInt32(textBox2.Text);
double pi = Math.PI;
double DTR = (double)number / 2;
double DTC = (double)number * pi;
double DTR2 =(double) number / 2;
This is the part: double DTA = (double)Math.Pow(DTR2, 2) * pi;
Re: Help squaring a variable
Math.Pow already returns a double, the cast is redundant.