#include <iostream>
using namespace std;
int main()
{
int sum=0;
int j;
cout << "How many numbers you want to add";
cin >> j;
int x[j];
for(int i=0; i<=j;i++)
{
cin >> x[i];
sum=sum+x[i];
}
cout << "The sum is = "<< sum;
cin.get();
return 0;
}
Thursday, 24 January 2013
Array Sum
08:15
ATEEK
No comments
0 comments:
Post a Comment