Develop a C++ program to calculate the area, perimeter and diagonal of a rectangle. The program should also offer the option to display the rectangle. The main flow of the program is given as follows:

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter7: Characters, Strings, And The Stringbuilder
Section: Chapter Questions
Problem 7PE
icon
Related questions
Question
Course Management Teaching Assesment
ePortfolio Mahara Course search Helpdesk
Develop a C++ program to calculate the area, perimeter and diagonal of a rectangle.
The program should also offer the option to display the rectangle. The main flow of
the program is given as follows:
red
20.00
The user should input the length and width of a rectangle.
The user can decide to display the drawing of the rectangle or not. If user indicate
yes, execute user's decision.
• Display the calculated area, perimeter and diagonal of the rectangle.
The program should repeatedly ask if the user wants to process another rectan-
gle.
Your program should include two functions with the following function prototypes:
void drawRec(int length, int width);
A function that display a full rectangle with +'.
void calcRec (int a, int b, int area, int perim, float diag);
A function that returns the area, perimeter and diagonal through pointer parame-
ter.
Sample output:
Enter the length and width of a rectangle: 4 8
Transcribed Image Text:Course Management Teaching Assesment ePortfolio Mahara Course search Helpdesk Develop a C++ program to calculate the area, perimeter and diagonal of a rectangle. The program should also offer the option to display the rectangle. The main flow of the program is given as follows: red 20.00 The user should input the length and width of a rectangle. The user can decide to display the drawing of the rectangle or not. If user indicate yes, execute user's decision. • Display the calculated area, perimeter and diagonal of the rectangle. The program should repeatedly ask if the user wants to process another rectan- gle. Your program should include two functions with the following function prototypes: void drawRec(int length, int width); A function that display a full rectangle with +'. void calcRec (int a, int b, int area, int perim, float diag); A function that returns the area, perimeter and diagonal through pointer parame- ter. Sample output: Enter the length and width of a rectangle: 4 8
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Algebraic Expression
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage