<iostream>

<math.h>

using namespace std;

 

int sumsquares_list(int array1[]){

 

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

int sum=0;

int square=0;

int array1[i];

square=(array1[i]*array1[i]);

}

return square;

}

 

int main(){

int array1[5];

for (int i=0; i<5; i++)

    {

        cout<<"Introduce the numerical value "<<(i+1)<<" : "<<endl;

        cin>>array1[i];

    }

 

cout<<"The result equals to "<<sumsquares_list(square)<<endl;

 

return 0;

}

 

CC BY 4.0 avance by Ever Ibarra Almaral is licensed under a Creative Commons Attribution 4.0 International License.