I have one array called ans[i].
ans[i]={1 2 3 4 5 6 7 8 9 10 11 12 13 14 } //n no.of inputed element.
and i want to split in group of 3 and sum of 3-3 elements and stored it in array.Like this
res[0]=6
res[1]=15
res[2]=24....like this.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Midhun TpRank #388 · 6.5K reputationPosted Sep 29, 2016, 2:24 AM EDT
Vaibhav DeshmukhRank #5,346 · 302 reputationPosted Sep 29, 2016, 2:18 AM EDT