Computer Science, asked by aritrakayal29, 5 hours ago

Write a program to input the side of a square and display the

length of the diagonal of a square in java .. write accurately I have to type​

Answers

Answered by laksh080707
0

Answer:

Name the class as ProgramSquare

public class ProgramSquare

{

public static void main(int side)

{

 int diagonal = side * Math.Sqrt(2);

 System.out.println(“Side : “+side);

 System.out.println(“Diagonal : “+diagonal);

}

}

Hope this helps you:)

Pls Mark as Brainlist

Similar questions