Java Number Power pow(int number, int power)

Here you can find the source of pow(int number, int power)

Description

pow

License

Open Source License

Declaration

public static int pow(int number, int power) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static int pow(int number, int power) {
        int result = 1;
        for (int i = 0; i < power; ++i)
            result *= number;/*from  ww w  . j a  va  2 s  .  c  o m*/
        return result;
    }

    public static long pow(long number, int power) {
        long result = 1;
        for (int i = 0; i < power; ++i)
            result *= number;
        return result;
    }
}

Related

  1. pow(int base, int exponent)
  2. pow(int base, int power)
  3. pow(int i, int pow)
  4. pow(int leftOp, int rightOp)
  5. pow(int n, int p)
  6. pow(int value, int exp)
  7. pow(int x, int y)
  8. pow(int[] arr, double p)
  9. pow(Integer a, Integer b)