i need help on the algorithm to write this program. please don't give me the code to solve the entire problem i just need the algorithm for the summation part.this is the question;
i want a an algorithm to sum elements in an array such that if we have A={a1,a2,a3,...,an}. we will create another array like B={a1+a2,a3+a4,...,a(n-1),an}
thank you.
this is my code so far, i need help urgently.
#include<iostream>
using namespace std;
int main()
{
int Arr[100],n,i,sum=0;
cout<<"Enter number of elements you want to insert ";
cin>>n;