Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please do these all in C++ , 2019 visual studio, thankyouu and please upload screenshots too LabTask wk01. Write a program to calculate the volume

please do these all in C++ , 2019 visual studio, thankyouu and please upload screenshots too
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
LabTask wk01. Write a program to calculate the volume of spheres, cylinders and boxes. Your program should contain three functions, each called calcVolume and returning a double. The volumes should be calculated according to the following formulas: -- The volume of a box is its width multiplied by its height multiplied by its length. an The volume of a sphere is -43 rr3 wherer is the radius of the sphere. -- The volume of a cylinder is rur2h, wherer is the radius of the cylinder and his the height of the cylinder. Define a global constant PI and set its value to 3.14. Your program should ask the user which shape's volume they want to calculate, and get the required information. It should then call the correct calcVolume function and output the volume to the screen. Lab02-01. What does Listing 1-1 do? Listing 1-1. 1 /// Read the program and determine what the program does. 2 3 import ; 4 import (limits); 5 6 int main() 7 8 int min(std:: numeric_limits int>::max 0); 9 int max (std:: numeric_limits(int)::min()); 10 bool any (false); 11 12 while (std::cin >> x) 13 ( 14 any = true; 15 if (x max) 18 max = x; 19 } 20 21 if (any) 22 std::cout

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

Financial Accounting The Basics

Authors: Ilias Basioudis

1st Edition

1138605514, 9781138605510

More Books

Students also viewed these Accounting questions