Largest Adjacent Sum of integers

Closed
jpatl Posts 1 Registration date Saturday September 15, 2012 Status Member Last seen September 15, 2012 - Sep 15, 2012 at 10:50 AM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Sep 16, 2012 at 11:48 AM
Hello,

how to return the largest adjacent sum of an array of integers?
example : int a[]={1,2,4,5};
return 9 because 1+2=3 and 4+5=9
9>5....
can anybody help me with this?
thank you



Related:

1 response

rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Sep 16, 2012 at 11:48 AM
I think, you would have to add then have to make which is the max number. I dont believe there is any inbuild functionality than can do it
0