Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C++ 3. Write a program that uses multiple functions; have a function to calculate the surface area of a rectangular parallelepiped (Call it calculate SurfaceArea)
C++
3. Write a program that uses multiple functions; have a function to calculate the surface area of a rectangular parallelepiped (Call it calculate SurfaceArea) and the other function to calculate volume of a rectangular parallelepiped (Call it calculateVolume) (see drawing below), given the length, height and width. Use a single function to input the length, height and width into the program. Call it getInput and use pass by reference in this function. Ensure, in that function, that all inputs are greater than zero. If any input is less than or equal to zero write a message to the console saying an improper value has been input and start the process over. Write a function that outputs the length, height, width and surface area and volume of the rectangular parallelepiped. Call it outputResults Use one decimal point of accuracy. Use a value of length 2.2, height 3.4 and width 2.8. Use Google to find the appropriate formulas. Name your program
Step 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