SHARE
TWEET

c

a guest Sep 20th, 2019 87 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int sumaSubMax1 (int v[], int n){
  2.     int sumaMax = 0;
  3.     for (int i=0; i < n ;i++){
  4.         int estaSuma = 0;
  5.         for (int j=i; j < n ;j++ ){
  6.             estaSuma += v[j];
  7.             if (estaSuma > sumaMax){
  8.                 sumaMax = estaSuma;
  9.             }
  10.  
  11.         }      
  12.        
  13.     }
  14.     return sumaMax;
  15.  
  16. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top