Compute and return the celsius temperature

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

Question: 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.

Can you write this program in c language? Define every function.

Reference no: EM13693794

Questions Cloud

Program that prompts the user to input the dimensions : 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.
Figure out the missing data : We are to figure out the missing data. To my understanding, there is going to be some kind of proportion here, or what? How would you go about figuring these out?
Write a program that reads the coordinates : Write a program that reads the (x,y) coordinates of a point in the Cartesian plane and prints a message telling in which quadrant, or on which axis (or axes) the point lies. The quadrants are labeled as follows:
Describe the chemical symbol of one of the elements : Write a program that reads a single character describing the chemical symbol of one of the elements H, C, N, O, F and prints the full name of the element.
Compute and return the celsius temperature : 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
Implement newtons method in matlab : Implement the secant method in Matlab and Implement Newtons method in Matlab
Cost-benefit analysis : The average annual cost to the company of a manager is $162,000, whereas no managerial professionals cost $121,000 a year on average; both figures include overhead.
Design a recursive algorithm to implement : Design a recursive algorithm to implement this specification. That is, the body of FindLast should contain a recursive call FindLast(A,..,..).
Write an application that stores 100 movies : Write an application that stores 100 movies and displays them by category.  The user can enter any of the categories to display the films in the list that match the category.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Write a header for the function named subtract

Write a header for the function named subtract. Subtract returns nothing and has one double parameter named num.

  Write a program to create 100 real random numbers

Write a program to create 100 real random numbers and store it into a 1-D array. Find the value 1413 from the stored data and print out the value 1413 and the index of the array to the screen

  How do you generate arrays, random numbers

How do you generate arrays, random numbers and multiply and add rows, columns and diagonals in C

  List three debugging methods within the debugger which can

list three debugging techniques within the debugger that can be used to locate logical error in the java code. for each

  Write a function that permanently swaps two integers

Write a function that permanently swaps two integers using pointers.

  The bubble sort is also define as the ripple sort one

the bubble sort is also define as the ripple sort. one implementation of this sorting methods is to recurrently move

  Write a for loop header that will count backwards

Write a statement to call a function named getAge that returns an integer and takes no parameters. Assign the returned value to the already declared variable child.

  Discuss the advantages and disadvantages of both the

discuss the advantages and disadvantages of both the structured and object-oriented oo paradigm in programming. why do

  Random permutations

Write a program in C++ that gives a prompt to the users, asking for an integer M.It then prints out a M different random permutations, one on each of M lines, of the numbers 1, 2, ... , 10, separated by spaces or tabs.

  Calculates how much a little league baseball team spent

Prepare a program that calculates how much a little league baseball team spent last year to purchase new baseballs.

  Object oriented programming paradigm is better choice

Explain why object oriented programming paradigm is considered better choice than structured programming paradigm. Does it reflect our "natural" way of thinking or do you find it artificial?

  Write application which ask user to input grades of students

Write C++ application which asks user to input grades for 5 student (3 grades each) save them in five double one dimensional arrays (one array for each student),

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