Write 2 functions in C program thát calculate surface drea and the volume of 3 (three) boxes where the width, height, and length of a boxes can all be different. Prompt the user to enter length of all side of the box. The functions should take the arguments of type Integer and return the values of surface area and the volume to the main program.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter6: User-defined Functions
Section: Chapter Questions
Problem 17PE
icon
Related questions
Question
Write 2 functions in C program that calculate surface area and the volume of 3 (three) boxes
where the width, height, and length of a boxes can all be different. Prompt the user to enter
length of all side of the box. The functions should take the arguments of type Integer and
return the values of surface area and the volume to the main program.
Sample of input and output
Enter the sides of the box 1: 2 3 4
=> Volume: 24 and Surface Area : 52
Enter the sides of the box 2: 4 5 2
=> Volume: 40 and Surface Area:76
Enter the sides of the box 3: 5 3 4
=> Volume: 60 and Surface Area : 94
Transcribed Image Text:Write 2 functions in C program that calculate surface area and the volume of 3 (three) boxes where the width, height, and length of a boxes can all be different. Prompt the user to enter length of all side of the box. The functions should take the arguments of type Integer and return the values of surface area and the volume to the main program. Sample of input and output Enter the sides of the box 1: 2 3 4 => Volume: 24 and Surface Area : 52 Enter the sides of the box 2: 4 5 2 => Volume: 40 and Surface Area:76 Enter the sides of the box 3: 5 3 4 => Volume: 60 and Surface Area : 94
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Concept of Parenthesis
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
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