Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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: image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems For Advanced Applications 17th International Conference Dasfaa 2012 Busan South Korea April 2012 Proceedings Part 1 Lncs 7238

Authors: Sang-goo Lee ,Zhiyong Peng ,Xiaofang Zhou ,Yang-Sae Moon ,Rainer Unland ,Jaesoo Yoo

2012 Edition

364229037X, 978-3642290374

More Books

Students also viewed these Databases questions

Question

Identify the depressants, and describe their effects.

Answered: 1 week ago