Computer Science, asked by manas021970, 8 months ago

write a program in java to find the area, perimeter and diagonal of a square. Display the output of the program by taking side of a square 25​

Answers

Answered by shubha1592
5

Answer:

hope it help you..........

Attachments:
Answered by Pranav9041733
5

Answer:

public class Square

{

public static void main(String args[])

{

int s, ar=0, p=0;

double d=0.0;

s=25;

ar=s*s;

p=4*s;

d=Math.sqrt(2)*s;

System.out.println("the perimeter of the square:"+p);

System.out.println("the area of the square:"+ar);

System.out.println("the diagonal of the square:"+d);

}

}

Similar questions