Computer Science, asked by joinit678, 4 months ago

write a program in java using array to input n mumbers from the user and display the square roots​

Answers

Answered by Anonymous
1

Answer:

package MyPackage;

import java.util.Scanner;

public class SquareRoot1 {

public static void main(String[] args)

{

Double num;

Scanner sc= new Scanner(System.in);

System.out.print("Enter a number: ");

num = sc.nextDouble();

Double squareroot = Math.pow(num, 0.5);

System.out.println("The Square of a Given Number " + num + " = " + squareroot);

}

}

Similar questions