Untitled
raw download clone
TEXT
views 13
,
size 472 b
int minim(int v[], int n){
    if(n == 0)
        return v[n];
    return min(v[n - 1], minim(v, n - 1));
}

int maxim(int v[], int n){
    if(n == 0)
        return v[n];
    return max(v[n -1], maxim(v, n - 1));
}

int suma(int v[], int n){
    if( n== 0)
        return 0;
    return v[n - 1] + suma(v, n - 1);
}
void P(int v[], int n, int &mini, int &maxi, int &suma1){

    maxi = maxim(v, n);
    mini = minim(v, n);
    suma1 = suma(v, n);

}
close fullscreen
Login or Register to edit or fork this paste. It's free.