I need help with my program. The program reads water temperatures and when they were recorded from an input file called " biodata2.txt." Then the output is displayed in a file called "results.txt" So the input file looks like this:
2 // number of readings taken
200707211245 // date recorded
F70.5 // Fahrenheit temperature
200708220812// date recorded
C19.97// Celsius temperature
So, the program rearranges the data to look like this:
Number of Recordings found: 2
C19.97-- recorded on 08/21/2007 at 08:12, etc. for any other data records.
I am also supposed to convert all Fahrenheit readings to Celsius. This is were the problem is, I read in the temperature in Fahrenheit using "inFile >> temp" and input it into the formula with result being "celsius" variable. The out put I get is -0 instead of the correct answer. Can anyone help me?
Passiongamer25 0 Light Poster
Salem 5,199 Posting Sage
MosaicFuneral 812 Nearly a Posting Virtuoso
Passiongamer25 0 Light Poster
Salem 5,199 Posting Sage
StuXYZ 731 Practically a Master Poster
Passiongamer25 0 Light Poster
MosaicFuneral 812 Nearly a Posting Virtuoso
Passiongamer25 0 Light Poster
Salem 5,199 Posting Sage
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague
Passiongamer25 0 Light Poster
Salem 5,199 Posting Sage
Passiongamer25 0 Light Poster
Salem 5,199 Posting Sage
Passiongamer25 0 Light Poster
hsoni007 0 Newbie Poster
Salem 5,199 Posting Sage
hsoni007 0 Newbie Poster
Passiongamer25 0 Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.