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
Get step-by-step solutions from verified subject matter experts
