WAP to display area and perimeter of a rectangle.
Answers
Answered by
3
class an
{
public static void main(int l,int b)
{
int area=l*b;
int perimeter=2*(l+b);
System.out.println("AREA="+area);
System.out.println("PERIMETER"+perimeter);
}
}
{
public static void main(int l,int b)
{
int area=l*b;
int perimeter=2*(l+b);
System.out.println("AREA="+area);
System.out.println("PERIMETER"+perimeter);
}
}
Answered by
1
Answer:
Hey! Here is your code in python...
x = float(input("Enter length of rectangle: "))
y = float(input("Enter breadth of rectangle: "))
print("Area of rectangle = ", x*y)
print("Perimeter of rectangle = ", 2*(x+y))
# HOPE THIS HELPS!!
Similar questions
Social Sciences,
8 months ago
Math,
8 months ago
English,
1 year ago
Social Sciences,
1 year ago
Biology,
1 year ago
Physics,
1 year ago
Hindi,
1 year ago