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
Tpy6a [65]
3 years ago
12

Write a complete program that asks the user to input the height and radius of a cone (both of type double) and calls two individ

ual functions to calculate the total area of the cone and the volume of the cone. The main function then prints these values with appropriate messages.
Computers and Technology
1 answer:
Vika [28.1K]3 years ago
4 0

Answer:

The program in C++ is as follows:

#include <iostream>

#include <math.h>

using namespace std;

double area(double r, double h){

   double A = 3.14 * r * (r + sqrt(h*h + r*r));

   return A;}

double volume(double r, double h){

   double V = (1.0/3) * 3.14 * r*r * h;

   return V;}

int main(){

   double radius, height;

   cout<<"Radius: "; cin>>radius;

   cout<<"Height: "; cin>>height;

   cout<<"Area: "<<area(radius,height)<<endl;

   cout<<"Volume: "<<volume(radius,height);

   return 0;

}

Explanation:

This declares the area function

double area(double r, double h){

Calculate area

   double A = 3.14 * r * (r + sqrt(h*h + r*r));

Return the calculated area

   return A;}

This declares the volume method

double volume(double r, double h){

Calculate volume

   double V = (1.0/3) * 3.14 * r*r * h;

Return the calculated volume

   return V;}

The main begins here

int main(){

Declare radius and height

   double radius, height;

Get input for radius

   cout<<"Radius: "; cin>>radius;

Get input for height

   cout<<"Height: "; cin>>height;

Call the area function and print the returned value for area

   cout<<"Area: "<<area(radius,height)<<endl;

Call the volume function and print the returned value for volume

   cout<<"Volume: "<<volume(radius,height);

   return 0;

}

You might be interested in
HELP 15 POINTS
masya89 [10]

Answer:

A I think I might be wrong

6 0
4 years ago
Read 2 more answers
How do I type fast?<br><br> Give me an actual answer...
Ugo [173]
Practice!
And a good keyboard I recommend mechanical key boards
But the best way to improving your WPM is definitely practice one way you can practice is playing typeracer it’s pretty fun way

Hope this helps!
Brainliest is much appreciated!
7 0
3 years ago
Read 2 more answers
Which of the following best describes the purpose of child labor laws?
BabaBlast [244]

Answer:

Are there supposed to be answer choices with this question?

Child labor laws are basically laws placing restrictions and regulations on the work of minors.

6 0
3 years ago
Read 2 more answers
Complete the function to return the result of the conversiondef convert_distance(miles):km = miles * 1.6 # approximately 1.6 km
AnnZ [28]

Answer:

The complete program is as follows:

def convert_distance(miles):

   km = miles * 1.6 # approximately 1.6 km in 1 mile

   return km

my_trip_miles = 55

# 2) Convert my_trip_miles to kilometers by calling the function above

my_trip_km =convert_distance(my_trip_miles) #3) Fill in the blank to print the result of the conversion

# 4) Calculate the round-trip in kilometers by doubling the result,

print("The distance in kilometers is " +str(my_trip_km))

# and fill in the blank to print the result

print("The round-trip in kilometers is " + str(my_trip_km * 2))

Explanation:

<em>The program is self-explanatory because I used the same comments in the original question.</em>

5 0
3 years ago
Lime is using social media to ask consumers about the qualities they desire in an electric scooter. The firm hopes to develop a
tresset_1 [31]

Answer:

The correct answer to the following question will be "Product".

Explanation:

  • Product marketing is often a mechanism by which a brand is marketed and delivered to a client. It's also known as the intermediate feature between product innovation and brand recognition or awareness.
  • It's something to which comparison is made when selling a product on the market to the consumer.

Therefore, the Product is the right answer for the above question.

8 0
3 years ago
Other questions:
  • Developers work together with customers and useras to define requirements and specify what the proposed system will do. If once
    9·1 answer
  • You receive a file named Project4.xlsx as an attachment to an email message. What do you expect the file to contain?
    8·1 answer
  • To use an imported image, simply drag it from the desktop onto the stage. true or false?
    14·1 answer
  • 1. What is Java SE?
    11·2 answers
  • What was the first e-commerce service?
    10·1 answer
  • A group of interrelated resources acting together according to a plan to accomplish the goals of the records and information man
    5·1 answer
  • THIS IS PYTHON QUESTION
    11·1 answer
  • In determining where to store specific data in a(n) centralized DBMS, factors such as communications cost, response time, storag
    12·1 answer
  • Read the section, "Junior Year." Why would someone chose to complete an apprenticeship after high school? How many occupations c
    14·2 answers
  • If a person communicates indirectly and attaches little value to
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!