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