Question: Write a C program to do the following tasks: 1 ) Create a text file temperatures.txt , which contains the average temperatures in Celsius for

Write a C program to do the following tasks: 1) Create a text file temperatures.txt, which contains the average temperatures in Celsius for the 5 winter months 11,12,1,2,3 for the 10 years 2010 till 2019 as follow: 2010181214172220112013131520..20191510111819-1 The file ends with the sentinel (-1) representing the year. Each line contains: year and 5 temperatures. 2) Let the program reads from the file temperatures.txt and computes the average temperatures for each year, and the highest and lowest temperatures. 3) Use a function calculate that receives year ,5 temperature values, and returns the average, highest, and lowest temperatures for the given 4 months that year. 4) Do the printing in the main function. 5) Display on screen (not on a file) the result as shown in the table below: yearaveragehighestlowest---------------------------------

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!