asked 175k views
0 votes
Write the code to read 3 input values for the length, height and width of a cuboid, then calculate the area and circumference.

asked
User Glaand
by
8.2k points

1 Answer

6 votes

Answer:

length = float(input("Enter the length: "))

height = float(input("Enter the height: "))

width = float(input("Enter the width: "))

area = 2 * (length * height + height * width + width * length)

circumference = 4 * (length + height + width)

print("The area is: " + str(area))

print("The circumference is: " + str(circumference))

Step-by-step explanation:

*The code is in Python.

Ask the user to enter the length, height and width

Calculate the area and circumference using the formulas and print them

answered
User Nishan
by
9.2k points

No related questions found