Question: Complete the program below. When it is complete, the rectangle, then display the rectangle's written. [50 points) 4- program will ask the user to enter
Complete the program below. When it is complete, the rectangle, then display the rectangle's written. [50 points) 4- program will ask the user to enter the width and length of getl ength- This function should double ask the user to enter the rectangle's length then return that value as a getWidth- This function should ask the user to enter the rectangle's width then return .getArea-This function should accept the rectangle's length and width as arguments and return the rectangle's area. The area is calculated by multiplying the length by the width. display Data- This function should accept the rectangle's length, width, and area as them in an appropriate message on the screen arguments and display include ciostream using namespace std; l/ Write the prototypes for the getLength / getWidth, getArea, and display Data W functions below. int maino double length, I/ The rectangle's length width, I/The rectangle's width area; l The rectangle's area /l Get the rectangle's length. length -getLengthO: // Get the rectangle's width. width = getWidth(): // Get the rectangle's area area getArea0: / Display the rectangle's data. displayData(length, width, area); return 0; / You must write the getLength, getWidth, getArea // and display Data functions belowion the next pag
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
