write a Java program to find square root using for loop
Answers
Answered by
0
Explanation:
import java.util.Scanner;
public class sq
{
public static void main()
{
Scanner sc= new Scanner(System.in);
System.out.println(" Enter a number ");
int num=sc.nextInt();
int sqr = Math.sqrt(num);
System.out.println( " The square root is : "+ sqr);
}
}
Similar questions