Menu
Question Index
...

Write a program to get inverse of the given number.

Input (Number) Output
2.0 0.5
30 0.03333
-15 -0.06667
0.0 null
null null



class InverseOfNumber
{
    public static void main(String s[])
    {
        Double value = 12.0;
        Double result = inverseOfNumber(value);
        System.out.println("The inverse of the given number 12.0 is "+result);

    }


        public static Double inverseOfNumber(Double value)
        {
            Double result = null;
            return result;
        }

}

Doubts

Problems

Topic: Java Double Class And Java Float Class

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App