Question: Develop a program that prompts the user to enter the length and width of a rectangle. Use a function for getting the length and separate

Develop a program that prompts the user to enter the length and width of a rectangle. Use a function

for getting the length and separate function for getting the width. The program will then calulate the

area of the rectangle using a function. After the area is calculated print out the area of the rectangle

(this will not be done via a function).

Hint 1: You will have a main module and 3 functions.

@Run your program twice using the following test data.

First run: length of 4 and a width of 2

Second run: length of 5 and a width of 3

Results:

First run:

Area = 8

Second run:

Area = 15

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!