Java Loops II

  • + 2 comments

    int tempAnswer = 0; for (int j = 0; j < loop; j++) { tempAnswer += (Math.pow(2, j) * b); System.out.print(tempAnswer + a + " "); }