Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static double logaritmo(String entrada) {
- double num;
- try{
- num = Double.parseDouble(entrada);
- }
- catch(IllegalArgumentException e1){
- throw new IllegalArgumentException("El parámetro debe ser positivo.");
- }
- return Math.log(num);
- }
Add Comment
Please, Sign In to add comment