/* --------------------------------------------------------------------- ** Exercise Using the Computer 3.3: Heat transfer. This program has been designed and started for you. Complete it by filling in the code according to the instructions in comments I, II, and III, below. When you are finished, insert your output here. ** --------------------------------------------------------------------- */ /* This program will compute the heat transferred from a stream of hot */ /* water to a stream of cold water that surrounds it. The calculations */ /* include the mean hot and cold temperatures and the differences in */ /* temperatures of the water flowing into and out of the pipes. */ #include void main( void ) { double hot1; /* hot inlet temperature */ double hot2; /* hot outlet temperature */ double cold1; /* cold inlet temperature */ double cold2; /* cold outlet temperature */ double mean_hot; /* average of hot temperatures */ double mean_cold; /* average of cold temperatures */ double dthot; /* difference in hot temperatures */ double dtcold; /* difference in cold temperatures */ puts( " Heat Transfer Experiment" ); /* I. Prompt the user to enter each of the four inlet and outlet temperatures. Use a separate prompt for each temperature you read. Use scanf to read each one and store it in the appropriate variable. */ /* II. Calculate the mean of the hot temperatures (their sum divided by 2) and the mean of the cold temperastures. Save each value in an appropriate variable. Calculate dthot (difference in hot temperatures = the hot outlet-temperature minus the hot inlet-temperature) and dtcold. Again, save these in the appropriate variables. Put appropriate comments on these lines describing the calculations. */ /* III. write printf statements to echo the four input temperatures. Write printf statements to print the four calculated numbers. Label each output clearly, so we can tell what it means. Use \n and spaces in your formats to make the output easy to read. Print your answers to an appropriate number of decimal places. */ puts( " Normal termination." ); }