title: how to properly use math.pow java function?
body: <p>here's what I'm trying to do:
  get two inputs from user and validate them. 1 is a random number between 1 and 20, the other is the times it should multiply itself over ( a number between 1 and 10 which I expressed through exponentiation)</p>
  
  <p>what I don't understand - math.pow only works with doubles? Also, is it possible that the user inputs "wrong" values and instead of terminating, the program asks for inputs again?</p>
  
  <p>I have this:</p>
  
  <pre><code>import java.util.Scanner;
  
  public class P01Multiplicador {
  
  public static void main(String[] args) {
      // TODO Auto-generated method stub
      System.out.println("insert number and how many times it will multiply itself over");
      Scanner in = new Scanner(System.in);
      int n = in.nextInt();
      int nReps = in.nextInt();
  
      if(n&lt;1 || n&gt;20 || nReps&lt;1 || nReps&gt;10){
          System.out.println("values are not accepted, please insert again");
      }
      else{
          do Math.pow(n, nReps);
          while(n&gt;1 &amp;&amp; n&lt;20 &amp;&amp; nReps&gt;1 &amp;&amp; nReps&lt;20);
  
      }
      in.close();
  
  }
  </code></pre>
  
  <p>it asks for the values but doesn't run properly(or, at all for that matter), i'm guessing I'm either using the wrong statements or wrong variable type. java newbie here. suggestions?</p>