Question: Hi everyone. I have the program below, and you can see the output at the bottom. This program reads from a csv file and prints

Hi everyone. I have the program below, and you can see the output at the bottom. This program reads from a csv file and prints the first 5 data records from that file. There are 5 different population results in the output. I need to add a function prototype and a function definition which should calculate and print the average of the populations.

Could someone help me with that? Thank you.

// CODE STARTS HEREHi everyone. I have the program below, and you can see theoutput at the bottom. This program reads from a csv file andprints the first 5 data records from that file. There are 5OUTPUT

different population results in the output. I need to add a function }

}

#include #include #include #include 6 using namespace std; 8 // data record represents each column for a record 9 struct dataRecord f 10 string borough; string year; string fips_county_code; string nta_code; string nta_name; string population; 12 13 15 16 17 18 i 19 20 21 // function prototypes 22 bool readCSVtoArray (string, dataRecord[], int) 23 void printRecord(dataRecord); 24 void print5(dataRecord[]); 25 26 27 28 IImain function 29 int main) 30 31 32 string filename -"New_York_City_Population_By_Neighborhood_Tabulation_Areas.csv"; const int size390; dataRecord myRecords[size]; 34 35 36 37 38 39 40 41 if (!readCSVtoArray(filename, myRecords, size))f cout

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!