We are going to simulate a small utility program that records the temperature inside the computer box. Each minute, the temperature is taken and stored in a file. Our program will read this file and calculate the highest, lowest and average temperature. The report on the analysis will be written to another file. It will also be printed to the screen.
We will read from the file until it is empty.
--> ./filetemps Usage: filetemps infilename outfilename --> ./filetemps tdata.txt Usage: filetemps infilename outfilename --> ./filetemps tdata.txt tdataout.txt There were = 10 data points minimum temp = 12 maximum temp = 76 sum temp = 325 avg temp = 32.5 --> cat tdataout.txt There were = 10 data points minimum temp = 12 maximum temp = 76 sum temp = 325 avg temp = 32.5 -->