{ int i; for(i=0;i<n;i++) cout<<x[i]<<" "; cout<<endl; }
float suma_pozitive_vector(float x[], int n)
{ int i; float s; s=0; for(i=0;i<n;i++) if(x[i]>0)s+=x[i]; return s; } int main() { int n,m,k; float x[100], y[100], z[100]; cout<<"Citeste vectorul x"<<endl; citeste_vector(x,n); cout<<"Citeste vectorul y"<<endl; citeste_vector(y,m); cout<<"Citeste vectorul z"<<endl; citeste_vector(z,k); cout<<"Vectorul x este : = "; afisaza_vector(x,n); cout<<"Vectorul y este : = "; afisaza_vector(y,m); cout<<"Vectorul z este : = "; afisaza_vector(z,k); cout<<"suma elementelor pozitive ale lui x este = "<<suma_pozitive_vector(x,n)<<endl; cout<<"suma elementelor pozitive ale lui y este = "<<suma_pozitive_vector(y,m)<<endl; cout<<"suma elementelor pozitive ale lui z este = "<<suma_pozitive_vector(z,k)<<endl;