Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This needs to be in C++ code. Would love the help of this in C++. Thanks. Your program must: Ask the user which type of

This needs to be in C++ code.

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

Would love the help of this in C++. Thanks.

Your program must: Ask the user which type of solid they have. Ask the user to enter the radius, length, width, or other information needed to calculate the volume and print the result. Ask the user if they would like to calculate the volume of another shape, and repeat if necessary. At the end, print the volume of the largest shape calculated. Contain seven functions: (One purpose of this assignment is to practice writing your own functions.) - main - a function to display the output - a function to find the volume of a rectangular solid - a function to find the volume of a cylinder - a function to find the volume of a sphere - a function to find the volume of a regular tetrahedron - a function to find the volume of a right circular cone. Contain a comment at the top with your name and a description of what the program does. Output all volumes in the following form: * * * * * * * Volume= * * * * * * * Sample input and output: (Inputs are bold) Welcome! Which type of solid to you have? rectangular solid=1, cylinder=2, sphere=3, regular tetrahedron=4, right circular cone=5 1 What is the length? 2.5 What is the width? 3.3 What is the height? 1.6 ** Volume=13.2 * * * * * * * Would you like to find the volume of another solid? 1=yes, 0=no 1 Which type of solid to you have? rectangular solid=1, cylinder=2, sphere=3, regular tetrahedron=4, right circular cone=5 4 What is the edge length? 10.2 * * * * Volume =125.06 * * * * * * Would you like to find the volume of another solid? 1=yes, 0=no 0 The largest solid had a volume of * * * * * * * Volume=125.06 * * Here are some volume formulas you may need: Solid Volume rectangular solid length*width* height cylinder T* (radius)2 * height sphere (radius)3 regular tetrahedron 6Va(length) right circular cone *(radius)? * height Include the cmath header to take a square root or raise a number to a power #include pow (2.5,3); sqrt

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

Step: 3

blur-text-image

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

Beginning C# 5.0 Databases

Authors: Vidya Vrat Agarwal

2nd Edition

1430242604, 978-1430242604

More Books

Students also viewed these Databases questions

Question

In an Excel Pivot Table, how is a Fact/Measure Column repeated?

Answered: 1 week ago