//suma elementelor pare
#include<iostream.h>
#include<conio.h>
typedef int vector[20];
int n;vector v;

int suma(int n)
{ if (n==0) return 0;
else return suma(n-1) + (v[n]%2==0)*v[n];
}

void main()
{
cout<<"n=";cin>>n;
for(int i=1;i<=n;i++)
{cout<<"v["<<i<<"]=";cin>>v[i];}
cout<<suma(n)<<endl;
getch();
}

{module orizontal600}