write a program in java using array to input n mumbers from the user and display the square roots
Answers
Answered by
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
Social Sciences,
2 months ago
English,
2 months ago
Math,
4 months ago
Chemistry,
10 months ago
Chemistry,
10 months ago