Your program should include two functions

Assignment Help C/C++ Programming
Reference no: EM13168200

Write a program that takes as input a depth (in kilometers) inside the earth and displays the temperature at this depth in degrees Celsius and in degrees Fahrenheit. The relevant formula is

C=10d+20

where C is the temperature in degrees Celsius and d is the depth in kilometers (a positive number). The temperature in degrees Fahrenheit is given by F=(9/5)C+32

Your program should include two functions. Function celsius_at_depth should compute and return the Celsius temperature at a depth given in kilometers. Function fahrenheit should convert a Celsius temperature to Fahrenheit.
Your program should interact with the user in exactly this manner:

Enter depth in kilometers=> 15.4
The temperature is 174.0 degrees C or 345.2 degrees F.

 

Reference no: EM13168200

Questions Cloud

Amanda and tyler opened a business : Amanda and Tyler opened a business that specializes in shipping liquids, such as milk, juice, and water, in cylinderical containers. The shipping charges depend on the amount of liquid in the container. (For simplicity, you may assume that the con..
Consider the problem of finding the position : Consider the problem of finding the position, p, of the last occurrence of a given number, x, in an array, A. We thus want a function FindLast(A,n,x) with precondition
Creates a file called "grades.txt" with 1000 lines : Write a program that creates a file called "grades.txt" with 1000 lines. Each line in the "grades.txt" file will consist of a student's first name, last name, graduating year(2013,2014,2015), and grade. the student's first name and last name for t..
Use a switch statement : Use a switch statement to write a program that prompts user to enter an character.
Your program should include two functions : Your program should include two functions. Function celsius_at_depth should compute and return the Celsius temperature at a depth given in kilometers. Function fahrenheit should convert a Celsius temperature to Fahrenheit.
A large environmental organization : A large environmental organization that provides services suchs as water quality monitoring and geological surveys to businesses and government agencies across the nation, needs help designing its corporate WAN
Describe and explain denial of service : Describe and explain Denial of Service (DoS) and Distributed Denial of Service (DDoS) network attacks
Ask the user to input a grade (integer from 1-100) : Program should still ask the user to input a grade (integer from 1-100) and then output the letter grade.  Scale:  Greater than 90 is an "A"; Greater than 80 to 90 is a "B", Greater than 70 to 80 is a "C", Greater than 60 to 70 is a "D", and 60 or le..
A class is a blueprint for an object : A class is a blueprint for an object. A class may have a default constructor, a constructor with arguments, accessor methods, mutator methods, public fields, and private fields.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Program to input the length of the side from the keyboard

write a program to input the length of the side from the keyboard ,use the class to obtain the areas of all shapes and display the results on the screen

  Draw the heap

Eric Rowe Starting with an empty minheap, draw the heap after each the completion of the following operations  and repeat for a maxheap (replace removeMin() with removeMax()). Upload your drawings here. Hand drawn is fine:

  Create a file, shared.txt

When your program starts, it shall do the following:1. Create a file, SHARED.txt, in the current directory (cwd). 2. Write it's pid (Process ID) followed by a Carriage Return and Newline in the file.

  Declare a vector

Declare a vector of these structures where the size of the vector is to be 7.

  Reverses all the element of an array

Write a function that reverses all the element of an array.that is,the first element is exchanged with the last element; the second element is exchange with the second to the last element,and so on

  Write a program that reads numbers

Write a C++ program that reads N positive numbers from the keyboard, calculates and shows the smallest number of all numbers

  Write c++ program that reads in the average monthly rainfall

Write a C++ program that reads in the average monthly rainfall for a city for each month of the year and then reads in the actual monthly rainfall for each of the previous 12 months

  How a base version of this assignment works

For this assignment you are to create an interactive moving sign in the context of a cityscape street scene. Click the link below to see how a base version of this assignment works. Type a message in the long blank slot at the top left, and then clic..

  Write a menu driven program for an online beef

Write a menu driven program for an online beef distribution company. There are 8 different

  Monkey business, a local zoo

Monkey Business, a local zoo, wants to keep track of how many pounds of food each of its three monkeys eats each day during a typical week. Write a program that stores this information in a two-dimensional 3 7 array, where each row represents a di..

  To use a sentinel loop so once the value of -99 i

modify this program to use a sentinal loop so once the value of -99 is entered after getting the pay and hours the program should end.

  C++ programming uml diagrams

The goal of this lab is to better familiarize you with polymorphism and the factory design pattern, two key components in Assignment

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd