Guest User

Untitled

a guest
Jan 21st, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1.  
  2. public static double logaritmo(String entrada) {
  3.  
  4. double num;
  5. try{
  6. num = Double.parseDouble(entrada);
  7. }
  8. catch(IllegalArgumentException e1){
  9. throw new IllegalArgumentException("El parámetro debe ser positivo.");
  10.  
  11. }
  12.  
  13. return Math.log(num);
  14. }
Add Comment
Please, Sign In to add comment