Question

# Write a program that calculates the energy needed to heat water…

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 temperature of the water.

The formula to use for this program is:

1. Q = waterMass ( finalTemperature – initialTemperature ) x 4184
2. waterMass is water weight in kilograms
3. finalTemperature and initialTemperature are temperatures in Celsius
4. Q is the results in Joules

“The joule is a derived unit of energy in the International System of Units. It is equal to the energy transferred to (or work done on) an object when a force of one newton acts on that object in the direction of the force’s motion through a distance of one metre (1 newton metre or N·m). It is also the energy dissipated as heat when an electric current of one ampere passes through a resistance of one ohm for one second. It is named after the English physicist James Prescott Joule.

OR