TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Pruthvi Patel
NA
129
23.7k
Split an array in n elements and sum like below.
Sep 30 2016 12:59 AM
This is different than previous uploaded question please see carefully.
I have one array called ans[i].
ans[i]={1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 } //
n no.of inputed element.Not fix array
and i want to split in group of 3 and stored it in array.Like this if x=2 the it should store the summation of 1+4+7+10+13..like below.
res[0]= 35 //1+4+7+10+13
res[1]=40 //2+5+8+11+14
res[2]=45 //3+6+9+12+15....like this.
Please Help me
Reply
Answers (
2
)
Split an array in n elements and sum like below.
Set font size of text file