Computer Science, asked by antrashukla26, 7 months ago

write a program to print the perimeter and area of a square

Answers

Answered by nitesh4288
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