write a program to print the perimeter and area of a square
Answers
Answered by
3
Explanation:
class PerimeterOfSquare
{
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
System.out.println("Enter the side of the square:");
double a=sc.nextDouble();
double perimeter=4*a;
System.out.println(perimeter);
}
}
Similar questions