Java Loops II

  • + 2 comments

    You are using

    int result
    

    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.