Write a program in java to accept the perimeter of a square and calculate its side.
Answers
Answered by
1
import java.util.*;
public class Square
{
public static void main(String args[])
{
Scanner in=new Scanner(System.in);
double x, n;
System.out.println("Enter the perimeter of he square");
x=in.nextDouble();
n=x/4;
System.out.println("The side of the square is"+n);
}
}
Similar questions