I'm trying to create a loop that calculates the total book sales for each year. I also need to calculate the total book sales for the last three years.

I have worked out how to calculate the sum of all 3 years however, I am having trouble with the calculation for total book orders sold each year. Here is what I have so far.

```
    const int months = 12;
    const int years =3;
    string namonths [months] = {"January", "February", "March", "April",
                 "May", "June", "July", "August", "September",
                 "October", "November", "December"};
int bookorders[years][months];
int sum=0;

for (int i = 0; i < years ; i++) {
for (int n = 0; n < months; n++) {

    std::cout << "Year " << i + 1 << " Month " << namonths[n] <<":"<< std::endl;

    cin >> bookorders[i][n];

    sum += bookorders[i][n];
}

}

//  std::cout << "total orders are for each year are: " << sum <<std::endl;
std::cout << "total orders are " << sum <<std::endl;

```