martes, 21 de abril de 2015

e_05


package ejercicio5;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class EJERCICIO5 {

    public static void main(String[] args) throws IOException {
        // TODO code application logic here
        int a;
        short n, r;
        BufferedReader in=new BufferedReader(new  InputStreamReader(System.in));
 System.out.println("a: ");
 a=(int) Integer.parseInt(in.readLine());//ojo
  System.out.println("n: ");
   n=(short) Integer.parseInt(in.readLine());//ojo
 r=(short)Math.pow((double)a,(1/(double) n));
 System.out.println("");
 System.out.println("Radicacion:" + r);
 System.out.println();
     
    }
}

No hay comentarios:

Publicar un comentario