Computer Science, asked by hackerpromax58, 1 month ago

write a program to define a class named area to store the side of a rectangle, calculate the area and the perimeter of the rectangle. in blue j​

Answers

Answered by animasinghdhabal
0

Answer:-

Hello am a teacher.This is the correct answer.. I teach students..You can reach out to me..Thank you.

public class Area

{

public static void main(String[] args) {

int length= 5;

int breadth=8;

int area;

int perimeter;

area= length * breadth;

perimeter = 2*(length + breadth );

System.out.println("Area is:" + area);

System.out.println("perimeter is:"+ perimeter );

}

}

Similar questions