Question: [C++ URGENT] Please fix my code. I'm trying to find the average of the year's data, have it output a single year with its average
[C++ URGENT] Please fix my code. I'm trying to find the average of the year's data, have it output a single year with its average.
The text file starts at 1947q2 so if I were to take the average it would be divided by three. The text file ends at 2009, which also only has 3 data(q1-q3). Everything else has 4 data (from q1 to q4)
TEXT FILE:
1947q2 -0.6 1947q3 -0.3 1947q4 6.2 1948q1 6.5 1948q2 7.6 1948q3 2.2 1948q4 0.6 1949q1 -5.4 1949q2 -1.4 1949q3 4.6 1949q4 -3.7 1950q1 17.2 1950q2 12.7 1950q3 16.6 1950q4 7.2
//GDP.cpp source #include HEADER FILE IF NEEDED..: //Class GDP definition #ifndef GDP_H_INCLUDED #define GDP_H_INCLUDED #include ![[C++ URGENT] Please fix my code. I'm trying to find the average](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f3ad551105a_65266f3ad548fb3d.jpg)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
