Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Assume that PrecinctReport is a structured type with these fields, address (a st

ID: 3638508 • Letter: A

Question

Assume that PrecinctReport is a structured type with these fields, address (a string), and three int fields which are counts of crimes in the given precinct: felonies, murders, and robberies. Assume that NPRECINCTS is a pre-declared int constant and that an array named allPrecincts with NPRECINCTS elements, each of type PrecinctReport has been declared and initialized

Write the necessary code that traverses the allPrecincts array and adds up all the murder counts storing the resulting total in murderCount.

Explanation / Answer

murderCount=0; for(int i=0;i