// simple_find_squareroot_type1
import java.io.*;
class simple_find_squareroot_type1
{
public static void main(String args[])
{
try
{
int no,m,i,div;
DataInputStream cin=new DataInputStream(System.in);
System.out.println("enter number to calculate is square root");
no=Integer.parseInt(cin.readLine());
m=no;
for(i=1;i<=no;i++)
{
div=no/i;
if(div==i)
{
System.out.println(div+" is square root of "+m);
break;
}
}
}
catch(Exception e)
{
System.out.println("wrong data");
}
}
}
No comments:
Post a Comment