1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
cricket20 [7]
3 years ago
13

Write the following functions. Each function needs function comments that describes function and its parameters double sphereVol

ume( double radius) double sphereSuface( double radius) double cylinderVolume( double radius, double height) double coneSurface( double radius, double height) double coneVolume( double radius, double height) That computes the volume and surface of the sphere with radius, a cylinder with a circular base with radius radius , and height height , and a cone with a circular base with radius radius , and height height . Then write a test program to prompt user to enter values of radius and height, call six functions and display the results c++
Computers and Technology
1 answer:
luda_lava [24]3 years ago
4 0

Answer:

Output

height: 10

radius: 2

Cylinder volume: 125.6

Cone Surface: 76.6037

Cone Volume: 41.8667

Sphere volume: 33.4933

Sphere surface: 50.24

Cylinder volume: 125.6

Explanation:

//Declaring variables

#include <iostream>

#include <cmath>

using namespace std;

//Defining Pi value

const double PI=3.14;

//Decliring the functions

//volume function for cone

double volumeCone(double r,double h){

       return  PI * r * r  * (h/3);

}

//volume function for sphere surface

double surfaceSphere(double r){

       return 4 * PI  * r * r;

}

//volume function for cylinderVol

double cylinderVol(double r,double h){

       return  PI * r * r * h;

}

//volume function for sphere volume

double sphereVol(double r){

       return 4/3.0 * PI * r * r * r;

}

//volume function for cone surface

double surfaceCone(double r,double h){

       return  PI * r * (r+sqrt(h *h + r  * r));

}

int main(){

       double r,h;

//print the values of height and radius

       cout<<"height: ";

       cin>>h;

       cout<<"radius: ";

       cin>>r;

//print the values of geometric forms

       cout<<"Cylinder volume: "<<cylinderVol(r,h)<<endl;

       cout<<"Cone Surface: "<<surfaceCone(r,h)<<endl;

       cout<<"Cone Volume: "<<volumeCone(r,h)<<endl;

       cout<<"Sphere volume: "<<sphereVol(r)<<endl;

       cout<<"Sphere surface: "<<surfaceSphere(r)<<endl;

       cout<<"Cylinder volume: "<<cylinderVol(r,h)<<endl;

       

       

}

You might be interested in
What is the decimal number 75 in binary and hexadecimal?
hammer [34]

Answer:

00110111 00110101-Binary

3735-Hex

8 0
3 years ago
Microsoft Word cannot be used to create personalized web<br> pages.<br> OTrue<br> False
Georgia [21]

Answer:

False

Explanation:

Because Microsoft can be used to create personalized web

5 0
2 years ago
Grenstall Inc., a software development firm, has adopted a new job evaluation system in which managers are asked to objectively
rosijanka [135]

Answer:

Grenstall is most likely using the point system

Explanation:

The point system is a method of job evaluation system that involves measuring performance of workers in an organization and allocating points to identifiable factors such as skills, efforts, training, knowledge and experience based on its performance. It does not focus on entire job functions. The allocated points enables the organization to determine the compensation that is commensurate for a particular position.

Greenstall Inc uses the point system technique of job evaluation system for its managers as their jobs were broken down based on their skills, mental and physical efforts, training, and responsibility with points being allocated to each of these factors which are then summed up.  

7 0
3 years ago
What are the four levels of access rights?
Svet_ta [14]

Explanation:

Currently, there are four primary types of access control models: mandatory access control (MAC), role-based access control (RBAC), discretionary access control (DAC), and rule-based access control (RBAC). Each model

5 0
2 years ago
Universal Containers uses an Auto-numbering system to uniquely identify each support request. They want customers to know this n
Nookie1986 [14]

Answer:

Following are the answers.

  • Auto-response Rules
  • Case Comment Notifications

Explanation:

They use the following system to determine that requirement for help in such a special manner. They need folks to identify the amount at the earliest opportunity. So, these Auto-response Rules and Case Comment Notifications are the functionalities that the System Admin implements to provide customers to easily obtain certain data are as follows.

8 0
3 years ago
Other questions:
  • What is the differnces between dark and middle ages of computer?​
    9·1 answer
  • How do you ask brainy a question without it not liking the question and saying it hurts their feelings?
    14·1 answer
  • Numeric data is stored in ___________ for direct processing.
    6·2 answers
  • When you catch an Exception object, you can call ____ to display a list of methods in the call stack so you can determine the lo
    6·1 answer
  • Why is a class called a factory of objects
    11·1 answer
  • Which of these are forms of data? Check all that apply.
    8·2 answers
  • Select the correct answer.
    10·2 answers
  • How many times do you return after the dateline ?
    12·1 answer
  • Why do my airpods keep disconnecting from my laptop
    8·2 answers
  • A. Mohit has bought a new laptop. The laptop is not working as no software is installed in
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!