You already know that the math package has the math.Sqrt() and math.Cbrt() functions to calculate the square and cube roots of float64 types; but what if we needed to calculate the n root of a number?
Create a Go program that takes as an input two numbers as variables: the num you will calculate the root of, and the n root you want to calculate. Then, after calculating the n root, print the output with two decimals.
The first hint to solve this task is that you can use the
math.Pow() function to calculate the n root of any number... in case you don't know yet how to use the math.Pow() function to do this, you may use the second hint below.Tip: We can easily calculate the n root of num raising it to the power of 1/n with the help of the math.Pow() function