This class determines the logarithm of a number public clas
// This class determines the logarithm of a number
public class DebugTwelve1
{
public static void main(String[] args) throws ArithmeticException
{
double num = -8.8, result;
try
{
if(num <= 0)
throw(new ArithmeticException());
result = Math.log(num);
System.out.println(\"Result is \" + result);
}
catch()
{
System.out.println(\"Can\'t take logarithm for value of zero or lower\");
}
}
}
Solution
//In this problem your question is not clear.so I will provide you the easier approach
//This is an easier way
//program which finds the logarithm of a number base 10 in java
![// This class determines the logarithm of a number public class DebugTwelve1 { public static void main(String[] args) throws ArithmeticException { double num = // This class determines the logarithm of a number public class DebugTwelve1 { public static void main(String[] args) throws ArithmeticException { double num =](/WebImages/15/this-class-determines-the-logarithm-of-a-number-public-clas-1023200-1761529456-0.webp)