Quantcast
Channel: CodeGuru Forums - Visual C++ Programming
Viewing all articles
Browse latest Browse all 3042

Issues with this code

$
0
0
It compiles, but no prompts show. I'm not sure whether it's complete or not either. My code is attached in a .txt file

Here were the instructions:

Write an interactive program whose input is a series of 5 temperatures from the user. It should write out in file tempdata.dat each temperature as well as the difference between the current temperature and the one preceding it, separated by two spaces. The difference is not output for the first temperature that is input. At the end of the program, the average temperature should be displayed for the user via cout. For example, given the input data

34.5 38.6 42.4 46.8 51.3

file tempdata.dat would contain

34.5
38.6 4.1
42.4 3.8
46.8 4.4
51.3 4.5

Use functions wherever appropriate. Be sure to use proper formatting and appropriate comments in your code. Provide appropriate prompts to the user. The output should be labeled clearly and formatted neatly.
Attached Files

Viewing all articles
Browse latest Browse all 3042

Trending Articles