Write a program in Java to accept side length of a square. Find and print area
and perimeter of the square
Answers
Answered by
0
Answer:
class Square
{
public void calculate(int side)
{
int area= side*side;
int peri= 4*side;
System.out.println(''Area of square is ''+ area);
System.out.println(''Perimeter of square is ''+peri);
}
}
Similar questions