Răspuns :
#include <iostream>
using namespace std;
int main()
{
int v[1000],n,i,p,s;
s=0; p=1;
cin>>n;
for(i=1;i<=n;i++)
cin>>v[i];
for(i=1;i<=n;i++)
{
if(v[i]%2==0)
s+=v[i];
else
p*=v[i];
}
cout<<"SUma numerelor pare este:"<<s<<endl;
cout<<"Produsul numerelor impare este:"<<p;
return 0;
}
using namespace std;
int main()
{
int v[1000],n,i,p,s;
s=0; p=1;
cin>>n;
for(i=1;i<=n;i++)
cin>>v[i];
for(i=1;i<=n;i++)
{
if(v[i]%2==0)
s+=v[i];
else
p*=v[i];
}
cout<<"SUma numerelor pare este:"<<s<<endl;
cout<<"Produsul numerelor impare este:"<<p;
return 0;
}