Solution to the problem number 380 of AceptaelReto - 380.

Any questions do not hesitate to contact.

#include <iostream>
using namespace std;

int main()
{
    int numero;
    long long int final=0;
    do
    {
        cin>>numero;
        if(numero!=0)
        {
            long long int array[numero];
            for(int p=0; p<numero;p++)
            {
                cin>>array[p];
                final+=array[p];
            }
            cout<<final<<"\n";
         }
            final=0;
        }
    while(numero!=0);
    return 0;
}

Don't miss anything.

Keep in touch with Isaac Lozano Osorio!