import java.util.*;
class Diagonal
{
public static void main(String args[])
{
Scanner in=new Scanner(System.in);
double a,d;
System.out.println("Enter the side of the Square");
a=in.nextInt();
d=Math.sqrt(2)*a;
System.out.println("Side of the Square= "+a);
System.out.println("Diagonal of the Square= "+d);
}
}
No comments:
Post a Comment