Computer Science, asked by abhi5617, 11 months ago

write a Java program to find square root using for loop​

Answers

Answered by jiyak6404
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