Răspuns:
#include<iostream>
using namespace std;
int main()
{
int i, n, v[i], s=0, p=1;
cout<<"n=";cin>>n;
for (i=1;i<=n;i++)
{cout<<"v[" <<i<<"] =" ;cin>>v[i];
s=s+v[i] ;
p=p*v[i] ;
}
cout<<"a) " ;
for (i=1;i<=n;i++)
cout<<v[i] <<" " ;
cout<<endl;
cout<<"b) ";
for(i=n;i>0;i--)
cout<<v[i] <<" ";
cout<<endl;
cout<<"c) Suma este egală cu " <<s<<endl;
cout<<"d) Produsul este egal cu " <<p;
return 0;
}