Computer Science, asked by alishyadav8cca, 27 days ago

write a java
program to find the area and perimeter of a rectangle of length 40 cm and breadth 20​

Answers

Answered by aastha1260
7

Explanation:

Logic to find perimeter and area of a rectangle

1) Input length and width of rectangle from user. ...

2) Apply formula to calculate rectangle perimeter i.e. perimeter = 2 * (length + width) .

3) Apply formula to calculate rectangle area i.e. area = length * width .

4) Finally, print the value of perimeter and area .

Similar questions