Final answer:
An error in the ending inventory for 2016 impacts both the ending inventory and cost of goods sold for 2016 and 2017, since ending inventory of one year affects the beginning inventory of the next.
Step-by-step explanation:
An error in the ending inventory for the year ended December 31, 2016, automatically creates errors in the ending inventory balance in the 2016 and 2017 financial statements, as well as in the reported cost of goods sold (COGS) for both years. This occurs because the ending inventory for one year becomes the beginning inventory for the next year, thus a mistake will carry over into the subsequent financial period. Furthermore, the incorrect ending inventory figure for 2016 will result in an inaccurate calculation of the 2016 COGS, since COGS is calculated by adding purchases to the beginning inventory and then subtracting the ending inventory. Likewise, the carryover of this error will affect the COGS for 2017.