wap a java program please it is important
Attachments:
Answers
Answered by
0
Answer:
dor86e96dp7sosoydoyd
Answered by
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
Social Sciences,
1 month ago
Math,
1 month ago
English,
1 month ago
Computer Science,
3 months ago
Physics,
3 months ago
Science,
9 months ago