write a program in java to accpet lengeth and breadth of a rectangle and print area and perimeter
Answers
Answered by
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
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
Hindi,
3 months ago
English,
7 months ago
Math,
11 months ago
Geography,
11 months ago
Accountancy,
11 months ago