I have been creating a program and making use of the Math.Pow and Math.Sqrt functions.
I know how to square something
answer = 64
and i know how to do square root (the opposite of squaring)
answer = 8
But what i am stuck on is if i do a higher power calculation.
For example if I do 8 to the power of 3 (8 cubed)
answer = 512
How do i do it in reverse? Obviously sqrt wont work and i am cubing the number.
I know how to square something
C#:
double answer;
answer = Math.Pow(8,2);
textbox.text = answer.ToString();
answer = 64
and i know how to do square root (the opposite of squaring)
C#:
double answer;
answer = Math.Sqrt(64,2);
textbox.text = answer.ToString();
answer = 8
But what i am stuck on is if i do a higher power calculation.
For example if I do 8 to the power of 3 (8 cubed)
C#:
double answer;
answer = Math.Pow(8,3);
textbox.text = answer.ToString();
answer = 512
How do i do it in reverse? Obviously sqrt wont work and i am cubing the number.