Given an integer number and we have to find their Square, Square Root and Cube.
In this program, we are using these two methods of Math class:
- Math.pow(m,n):
It is used to get the power of any base, it will return m to the power of n (m^n).
- Math.sqrt(m):
It is used to get the square root of any number, it will return square root of m.
Consider the program:
Output
need an explanation for this answer? contact us directly to get an explanation for this answer