Computer Science, asked by abdulmalik1508200724, 4 days ago

)What will be the output of the following System.out.println(Math.sqrt(-16));​

Answers

Answered by chyadav88512
1

Answer:FOUR  (4)

The square root of 16 is 4.

Math.sqrt(16) = 4

see watch...

 

import java.io.*;

import java .math.*;

class SquareRoot

{

    public static void main(String args[])

    {

       

        double x=-1;

            while (x<0)

           {

              System.out.print(" Input the positive number :>");

              String inbuff = System.console().readLine();

              x = Double.parseDouble(inbuff);

            }

           System.out.println(" The square root of " + x + " is " + Math.sqrt(x));

    }

}

Explanation:

Answered by rajput1234sarthak
0
Duds chi be Chhibber was my time of
Similar questions