We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Why are you trying to output the result as a String? The exercise is a expecting a single int (the sum of the array), in your case the 'sum'. I hope this make sense.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Simple Array Sum
You are viewing a single comment's thread. Return to all comments →
Why are you trying to output the result as a String? The exercise is a expecting a single int (the sum of the array), in your case the 'sum'. I hope this make sense.