We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
to find a power of value of the result variable using
Math.pow()
which returns a double value as a library method. You thus need to cast it to an int in order for it to work/compile. You will get a casting error otherwise.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Java Loops II
You are viewing a single comment's thread. Return to all comments →
You are using
to find a power of value of the result variable using
which returns a double value as a library method. You thus need to cast it to an int in order for it to work/compile. You will get a casting error otherwise.