Question Math.Pow & Math.Sqrt question

MinusZero

Member
Joined
Oct 22, 2012
Messages
7
Programming Experience
1-3
I have been creating a program and making use of the Math.Pow and Math.Sqrt functions.

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.
 
Top Bottom