Largest Adjacent Sum of integers

[Closed]
Report
Posts
1
Registration date
Saturday September 15, 2012
Status
Member
Last seen
September 15, 2012
-
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
-
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



1 reply

Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768
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