Question: 1) Write a program that calculates the energy needed to heat water from an initial temperature to a final temperature. Your program should prompt the

1) Write a program that calculates the energy needed to heat water from an initial temperature to a final temperature. Your program should prompt the user to enter the amount of water in kilograms and the initial and final temperatures of the water. The formula to compute the energy is

 Q = M * (finalTemperature - initialTemperature) * 4184 

where M is the weight of water in kilograms, initial and final temperatures are in Celsius, and energy is measured in joules. Here is a sample run: *Note: the values entered are shown under the prompt but are not actually part of the output of the program.

Enter the amount of water in kilograms: 55.5 Enter the initial temperature: 3.5 Enter the final temperature: 10.5 The energy needed is 1625484.0

1) Write a program that calculates the energy needed to heat water

from an initial temperature to a final temperature. Your program should prompt

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!