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
Social Sciences,
5 months ago
Political Science,
5 months ago
English,
11 months ago
Math,
11 months ago
Physics,
1 year ago
Math,
1 year ago