month concentration co2 year 101.9 (the number will be added by 1 until 31 december 2021.) 1231.9 (this is the value at 31 december 2021) 1 2019 12 2021

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

please help to write in C++ Language 

The data will increase by +1 until (12) 2021

month
уеar
concentration co2
1
2019
101.9 (the number will be added by 1 until 31 december 2021.)
1231.9(this is the value at 31 december 2021)
12
2021
Transcribed Image Text:month уеar concentration co2 1 2019 101.9 (the number will be added by 1 until 31 december 2021.) 1231.9(this is the value at 31 december 2021) 12 2021
Everyday, a company records carbon dioxide (CO2) concentration in its green house, in unit of parts-per-million (ppm).
The company has been in operation since the past three years (i.e., from Jan 2019 to Dec 2021). The CO2 concentration
readings are stored in a text file, CO2.txt in the format as shown in Figure 1, where:
The first number in each line of the file is the corresponding month number,
The second number is the year, and
The third is the CO2 concentration in ppm, for the particular day (in sequence) of the month and year.
Suppose the CO2 data recording for the three years are as stored in a file in the format as shown in Figure 1.
1 2018 CO2_day1
1 2018 CO2_day2
Data format: <month year co2_concentration >
1 2018 CO2_day30
2 2018 CO2_day1
2 2018 CO2_day2
2 2020 CO2_day28
12 2021 CO2_day31
Figure 1: Contents of input file CO2.txt
Suppose you work with the company as a programmer and your employer passes file CO2.txt to you. Your job is to:
Write a modular program with 3 or more user-defined functions to calculate total CO2 amounts for each month of
the three years. Assume that there are 28 days for February of any year.
Your program must make use of 2 structures (to store input and output data), apart from other necessary variables.
Only pointers must be used for structure handling, i.e., direct manipulation on structures is not allowed.
The results must be tabulated in a table named Table 1 with the correct table title/caption, to be displayed on
screen and in an output file named CO20utfile.txt.
Transcribed Image Text:Everyday, a company records carbon dioxide (CO2) concentration in its green house, in unit of parts-per-million (ppm). The company has been in operation since the past three years (i.e., from Jan 2019 to Dec 2021). The CO2 concentration readings are stored in a text file, CO2.txt in the format as shown in Figure 1, where: The first number in each line of the file is the corresponding month number, The second number is the year, and The third is the CO2 concentration in ppm, for the particular day (in sequence) of the month and year. Suppose the CO2 data recording for the three years are as stored in a file in the format as shown in Figure 1. 1 2018 CO2_day1 1 2018 CO2_day2 Data format: <month year co2_concentration > 1 2018 CO2_day30 2 2018 CO2_day1 2 2018 CO2_day2 2 2020 CO2_day28 12 2021 CO2_day31 Figure 1: Contents of input file CO2.txt Suppose you work with the company as a programmer and your employer passes file CO2.txt to you. Your job is to: Write a modular program with 3 or more user-defined functions to calculate total CO2 amounts for each month of the three years. Assume that there are 28 days for February of any year. Your program must make use of 2 structures (to store input and output data), apart from other necessary variables. Only pointers must be used for structure handling, i.e., direct manipulation on structures is not allowed. The results must be tabulated in a table named Table 1 with the correct table title/caption, to be displayed on screen and in an output file named CO20utfile.txt.
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY