Social Sciences, asked by swathasingh, 4 months ago

wap a java program please it is important​

Attachments:

Answers

Answered by gujardevansh
0

Answer:

dor86e96dp7sosoydoyd

Answered by 1minutememes1208
0

import java.util.*;

public class Square

{

   public static void main(String args[])

   {

       Scanner in = new Scanner(System.in);

       System.out.println("enter the side of the square");

       double side = in.nextDouble();

       

       double area = side * side ;

       double diagonal = Math.sqrt(2) * side ;  

       

       System.out.println("area of square = "+area);

       System.out.println("Diagonal of square = "+diagonal);

   }

}

Similar questions