In: Computer Science
Program Requirements:
Write a C++ program according to the following requirements:
1. Open the data file Electricity.txt and read each column into an array (8 arrays total).
2. Also create 2 arrays for the following:
Electricity.txt:
Net generation United States all sectors monthly
https://www.eia.gov/electricity/data/browser/
Source: U.S. Energy Information Administration
All values in thousands of megawatthours
Year all fuels coal
natural gas nuclear
hydroelectric wind
solar
2018 347576.0 95496.8
122393.9 67257.0
24377.0
22720.8 7780.4
2017 336189.2 100486.3
108034.6 67079.1
25027.8 21191.9
6439.7
2016 339722.9 103262.4
114858.9 67141.2
22317.7 18916.0
4572.2
2015 339800.1 112699.8
111123.5 66431.5
20756.7 15893.2
3252.7
2014 341133.8 131809.2
93884.1 66430.5
21613.9
15137.9 2410.3
2013 338830.3 131759.6
93736.3 65751.4
22380.4
13986.6
2012 337313.8 126170.2
102157.8 64110.9
23020.0 11735.1
2011 341678.4 144452.5
84474.1 65850.4
26612.9
10014.7
2010 343755.0 153940.9
82308.1 67247.4
21683.6
7887.7
2009 329194.2 146325.4
76748.2 66571.2
22787.1
6157.2
2008 343282.3 165483.4
73581.7 67184.0
21235.9
4613.6
2007 346395.4 168038.0
74715.8 67202.1
20625.8
2870.8
2006 338725.2 165875.9
68036.7 65601.6
24103.9
2215.8
2005 337951.9 167739.4
63413.4 65165.5
22526.8
1484.2
2004 330879.6 164858.4
59175.0 65710.7
22368.1
1178.6
2003 323598.8 164478.1
54159.0 63644.4
22983.9
932.3
2002 321537.7 161094.2
57583.8 65005.3
22027.4
862.9
2001 311387.0 158663.0
53260.8 64068.9
18080.1 561.4
C++ CODE:
Electricity.txt:
OUTPUT:
FOR ANY HELP JUST DROP A COMMENT