You did not specify if numbers are natural so I am assuming they are natural.
Also I recommend you to declare the variable i inside the loop like this:
for (int i = 0; i < n; i++)
1 2 3 4 5 6 7 8 9 10 11 12 13 14
#include <iostream>
usingnamespace std;
int main () {
int n, i, x, sum;
cout << "How much do you want to count the sum of?\n";
cin >> n;
for(i = 0; i < n; i++) {
cin >> x;
sum += x;
if (i+1 != n) cout << x << " + ";
else cout << x << " = " << sum << endl;
}
}