Respuesta :

ijeggs

Answer:

#include <iostream>

using namespace std;

int main()

{

   int  storeSales [7];

   //Receiving user input

   for(int i = 0; i<7; i++){

       cout<<"Enter the sales"<< endl;

       cin>>storeSales[i];

   }

   //calculating and printing the total

   int total = 0;

   for(int i = 0; i<7; i++){

       total = total + storeSales[i];

   }

   cout << "The total is: " <<total<< endl;

   return 0;

}

Explanation:

  • Using C++ programming language
  • Create an array of size seven (Since there are seven days in a week)
  • Use a for loop to add up elements to the arrays when user is prompt
  • use a second for loop to calculate the total of the element added
  • Outside the second for loop, print the total