Just need some help. My program at the moment is below this set of instructions. I have no clue what to do next, need some help please guys.
<Your full name>’s Space Travel Company does temperature conversion from Celsius to Fahrenheit for planets.
The company has a file named “PlanetCelsius.dat” which contains the following information:
Planet numberinteger
Planet namestring
Diameterinteger
Average Temperature in Celsiusdouble
The formula for converting a temperature from Celsius to Fahrenheit is F = 9C/5 + 32 Write a C++ program that does the following:
Read in the file, converts Celsius temperature to Fahrenheit equivalent
Display all information to the monitor including Planet number, Planet name, Diameter, Temperature in Celsius, and Temperature in Fahrenheit
Find the planet with the highest average temperature, output the hottest planet name and temperature in Celsius
Find the planet with the lowest average temperature, output the coolest planet name and temperature in Celsius
Creates an output file called “PlanetFahrenheit.dat” that contains Planet number, Planet name, Diameter and Temperature in Fahrenheit.
PlanetCelsius.dat should look like this: 1 Mercury 4878 117 2 Venus 12104 480 3 Earth 12756 14 4 Mars 6794 -63 5 Jupiter 142984 17 6 Saturn 120536 -130 7 Uranus 51118 -197 8 Neptune 49532 -200 The display should look like this: Number Planet Name Diameter Celsius Fahrenheit 1 Mercury 4878 km 117.00 242.60 //9*(117)/5 + 32
2 Venus 12104 km 480.00 896.00 //9*(480)/5 + 32
3 Earth 12756 km 14.00 … //calculate F
4 Mars 6794 km -63.00 … //calculate F
5 Jupiter 142984 km 17.00 …
6 Saturn 120536 km -130.00 …
7 Uranus 51118 km -197.00 …
8 Neptune 49532 km -200.00 -328.00 //calculate F The hottest planet is …, the temperature is … in Celsius. The coolest planet is …, the temperature is … in Celsius.
Page 3 of 3
PlanetFahrenheit.dat should look like this: 1 Mercury
4878 242.60 2
Venus
12104 896.00 … //should also include planets 3 to 7 …
8 Neptune
49532 -328.00
int main()
{
//ifs and ints
ifstream planetTemperature("PlanetCelsius.dat");
string planets;
int planetNumber;
int planetSize;
double averageCelisus, averageFahrenheit;
//end ifs and ints