fork(1) download
  1. import java.lang.*;
  2.  
  3. class Calculadora {
  4. public static int power(int n, int p) {
  5. if (n < 0 || p < 0) {
  6. throw new IllegalArgumentException("n ou p");
  7. }
  8. return (int)Math.pow(n, p);
  9. }
  10. public static void main(String[] args) {
  11. System.out.println(power(10, 2));
  12. }
  13. }
Success #stdin #stdout 0.09s 320576KB
stdin
Standard input is empty
stdout
100