The temperature of an object changes when it absorbs or loses thermal energy. It is possible to relate the amount of heat transferred, denoted by a variable q with units of joules, to the quantity of the substance m, by the following equation: q = mCsΔt  Write a script that calculates amount of heat transferred for any amount of aluminum. Aluminum has a specific heat Cs = 0.897.  The program should prompt the user to enter values for Δt and m, and should return the amount of heat transferred in units of joules. Test the program with values of 20 ℃ and 100 g.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter1: Fundamentals Of C++ Programming
Section1.1: Preliminary One: Unit Analysis
Problem 10E: (Thermodynamics) The work, W, performed by a single piston in an engine can be determined by this...
icon
Related questions
Question

The temperature of an object changes when it absorbs or loses thermal energy. It is possible to relate the amount of heat transferred, denoted by a variable q with units of joules, to the quantity of the substance m, by the following equation:

q = mCsΔt 

Write a script that calculates amount of heat transferred for any amount of aluminum. Aluminum has a specific heat C= 0.897. 

The program should prompt the user to enter values for Δt and m, and should return the amount of heat transferred in units of joules. Test the program with values of 20 ℃ and 100 g.

3. The temperature of an object changes when it absorbs or loses thermal energy. It is possible to
relate the amount of heat transferred, denoted by a variable q with units of joules, to the quantity
of the substance m, by the following equation:
q = mC,AT
where Cs is the specific heat of the substance in units of J/(g°C), 4T is the change in temperature
in units of °C, and m is the mass of the substance in grams. Write a script that calculates amount of
heat transferred for any amount of aluminum. Aluminum has a specific heat C = 0.897 J/(g. °C).
The program should prompt the user to enter values for AT and m, and should return the amount of
heat transferred in units of joules. Test the program with values of 20 °C and 100 g.
Transcribed Image Text:3. The temperature of an object changes when it absorbs or loses thermal energy. It is possible to relate the amount of heat transferred, denoted by a variable q with units of joules, to the quantity of the substance m, by the following equation: q = mC,AT where Cs is the specific heat of the substance in units of J/(g°C), 4T is the change in temperature in units of °C, and m is the mass of the substance in grams. Write a script that calculates amount of heat transferred for any amount of aluminum. Aluminum has a specific heat C = 0.897 J/(g. °C). The program should prompt the user to enter values for AT and m, and should return the amount of heat transferred in units of joules. Test the program with values of 20 °C and 100 g.
Expert Solution
steps

Step by step

Solved in 7 steps with 3 images

Blurred answer
Knowledge Booster
Mathematical functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr