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
julia-pushkina [17]
3 years ago
15

Write a program totake a depth (in kilometers) inside the earth as input data;compute

Computers and Technology
1 answer:
lions [1.4K]3 years ago
5 0

Answer:

#include<iostream>

using namespace std;

//define function to calculate the temperature in Celsius

float celsius_at_depth(float depth){

   float celsius = 10 * (depth) + 20;  //formula for calculation

   return celsius;

}

//define function to calculate the temperature in Fahrenheit

float fahrenheit(float celsius){

   float fahrenheit = 1.8 * (celsius)+ 32;//formula for calculation

   return fahrenheit;

}

//main function program start from here

int main(){

   //initialization

   float depth;

   print message

   cout<<"Please enter the depth (in kilometers): ";

   cin>>depth;

   float cel = celsius_at_depth(depth);  //Calling the function

   float feh = fahrenheit(cel);      //Calling the function

   //print the outputs

   cout<<"The Celsius temperature at depth in km: "<<cel<<endl;

   cout<<"The temperature in Fahrenheit is: "<<feh<<endl;

}

Explanation:

Create function celsius_at_depth with return type float and a parameter. This function takes the value depth from the calling function and calculate the temperature in Celsius and then returns the result to the calling function.

create the second function Fahrenheit with return type float and with one parameter. This function takes the temperature input in Celsius and convert into Fahrenheit and then return to the calling function.

Create the main function and declare the variable.

print the message for the user and store the value enter by the user by using the instruction cin.

then, calling the function and store the return outputs.

Finally, print the output.  

You might be interested in
The _____ is the task force formed by the World Wide Web Consortium to set standards on accessibility for web pages.
brilliants [131]

Answer:

Web Accessibility Initiative

Explanation:

This is the group that creates disability standards online.

8 0
2 years ago
Do companies speed up internet when you run speed test
Alecsey [184]

Answer:

you can call your internet provider to see if they can speed it up!

Explanation:

3 0
2 years ago
What does C.L.O stands for?
Ray Of Light [21]

It stands for 'collateralized loan obligation'

Meaning,
A collateralized loan obligation (CLO) is a security backed by a pool of debt, often low-rated corporate loans.

4 0
2 years ago
Read 2 more answers
Explaing why the findings are different between a general purpose search engine ( google) and a meta search engine ( ask jeeves)
Softa [21]
A lot of people use google and on all search engines the sites are ordered in what people click on the most. Popularest website that fits in with the key words and different people used different websites and different search engines
6 0
2 years ago
In the Solmaris Condominium Group database, the number of the condo unit needing service with service_id 6 is _____.
zhenek [66]

Answer:

C06

Explanation:

From the attached table or images of Solmaris Condominium Group database we can see that the "ServiceRequest" table has 'ServiceID 6' attached to 'CondoID 14'.

However, in the "CondoUnit" table, we have the 'CondoID 14' attached to 'UnitNum C06.'

Hence, In the Solmaris Condominium Group database, the number of the condo unit needing service with service_id 6 is "C06"

7 0
2 years ago
Other questions:
  • Write code statements to create a DecimalFormat object that will round a formatted value to four decimal places. Then write a st
    15·1 answer
  • What may happen if a large number of computer users are attempting to access a web site at the same time that you are
    9·2 answers
  • Controlled intersections use some form of which of the following:
    7·1 answer
  • How can you tell that a website is valid and reliable
    7·2 answers
  • Before donating a computer you should use a program to wipe the hard disk to remove all of its data
    12·2 answers
  • Each tab is divided into groups of related commands or buttons. T or F
    10·1 answer
  • ​Lisa mentions that a program is developed to interact with other programs, and she wants to begin by testing the programs indiv
    12·1 answer
  • Llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
    7·1 answer
  • ____ is the most widely used language for writing system software because it combines the power of a high-level language with th
    12·1 answer
  • Darla is going to start writing the HTML code for a web page. What would she start with?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!