Computer Science, asked by ayushpandey9431, 7 months ago

write a program in java to accpet lengeth and breadth of a rectangle and print area and perimeter​

Answers

Answered by Vedanshi2010
5

Answer:

Hey mate this is the answer hope it helps

Java Program to Create a Simple Class to Find out the Area and Perimeter of Rectangle

public class Area_Perimeter.

int l, b, perimeter, area;

Scanner s = new Scanner(System.

System. out. print("Enter length of rectangle:");

l = s. nextInt();

System. out. ...

b = s. nextInt();

perimeter = 2 * (l + b);

Please mark me as brainliest and follow

Hope it helps

Answered by samirthakur1704
2

Explanation:

Java Program to Create a Simple Class to Find out the Area and Perimeter of Rectangle

public class Area_Perimeter.

int l, b, perimeter, area;

Scanner s = new Scanner(System.

System. out. print("Enter length of rectangle:");

l = s. nextInt();

System. out. ...

b = s. nextInt();

perimeter = 2 * (l + b);

Similar questions