Question: Create a project in Code::Blocks and write a program that prompts the user for the two (2) side lengths of a rectangle and computes the

Create a project in Code::Blocks and write a program that prompts the user for the two (2) side lengths of a rectangle and computes the area, perimeter, and the diagonal of the rectangle using functions that are located in a header file. The program will use two files. Main will contain the prompts for the user and calls to the functions. The header file will contain the required functions. Output must be from the output function. Four functions are required (and will be in the separate header file). 1. Prompt for side length 1, then prompt for side length 2 in main 2. Call a function that computes the area of the rectangle and returns the value 3. Call another function that computes the perimeter and returns the value 4. Call another function that computes the diagonal and returns the value 5. Call an output function that displays all of the values with descriptions Function names should describe what the function does (ex: get_perimeter, display_output, etc).

Code in C++

Please use and declare several functions.

Sample output: Create a project in Code::Blocks and write a program that prompts the

Enter the length of side one: 3 Enter the length of side two: 4 The area of the rectangle is: The perimeter of the rectangle is: The diagonal of the rectangle is: 12.00 14.00 5.00 Process returned (0x0) execution time : 2 Enter the length of side one: 3.2 Enter the length of side two: 4. 13.12 The area of the rectangle is: The perimeter of the rectangle i: 14.60 The diagonal of the rectangle is: 5.20 Process returned 0 (0x0) execution time 4.290 s Press any key to continue

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!