Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Part 1: Daily Averages Consider the small input sample below. Please write c code. Part 1: Daily Averages Consider the small input sample below 3

Part 1: Daily Averages Consider the small input sample below.

Please write c code.

image text in transcribed

image text in transcribed

Part 1: Daily Averages Consider the small input sample below 3 11 12 05 1 8.7 3 11 11 56 143 8.6 3 11 13 01 163 8.9 3 10 18 05 1 7.3 3 10 19 01 1 7.3 2 28 01 02 2 -1.0 2 28 09 07 2-0.5 6 10 17 00 111 18.7 Notice that there are observations present for 4 different days (March 11th, March 10th, Feb. 28th and June 10th) Your task for part 1 is to write a program which reads an input file containing any number of observations and generates an output file called daily_averages_summary.txt containing the average temperature for each month/day in the input file The output will be a text file with one line for each month/day in the input file. Each line will have the format "month day average temperature", where temperature is printed with two decimal places (using the %.2f, specifier). The output must be printed ordered by month and day Days for which no observations were recorded must be omitted from the output. For example, on the input sample above, the output would be 2 28 -0.75 3 10 7.30 3 11 8.73 6 10 18.70

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Statistical And Scientific Database Management International Working Conference Ssdbm Rome Italy June 21 23 1988 Proceedings Lncs 339

Authors: Maurizio Rafanelli ,John C. Klensin ,Per Svensson

1st Edition

354050575X, 978-3540505754

More Books

Students also viewed these Databases questions