Untitled
raw download clone
TEXT
views 31
,
size 265 b
void F(int n,int a[],int &k)
{
    if(n==1)
    {
        if(a[0]%2==0) k=a[0];
        else k=-1;
    }
    else{
        F(n-1,a,k);
        if(a[n-1]%2==0)
        {
            if(k==-1) k=a[n-1];
            else k=k*10+a[n-1];
        }
    }
}
close fullscreen
Login or Register to edit or fork this paste. It's free.