Computer Science, asked by daranasha7200, 11 months ago

write a program that outputs the result of the following evaluation based on the number enter by the user
1 natural logarithm of the number.
2 absolute value of a number
3 square root of the number

Answers

Answered by sbabludeva1
8

Answer:

By Java Program

Explanation:

Below example shows how to calculate natural logarithm value of a given number using Math.log() function.

Code:

package com.java2novice.math;

public class MyLogEx {

public static void main(String a[]){

System.out.println("Natural logarithm value of 2 is: "+Math.log(2));

System.out.println("Natural logarithm value of 10 is: "+Math.log(10));

System.out.println("Natural logarithm value of 15 is: "+Math.log(15));

}

}

Output:

Natural logarithm value of 2 is: 0.6931471805599453

Natural logarithm value of 10 is: 2.302585092994046

Natural logarithm value of 15 is: 2.70805020110221

Similar questions