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:
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 continueStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started