add cubed numbers

#include <iostream>
using namespace std;

int main () {
for (int x = 1; x <= 14; x++)
{
cout << x*x*x << endl;
}

return 0;
}

I want to add the cubes together for example:
1^3 + 2^3 +3^3....14^3 which is suppose to equal 11025.
how to i add them together in code?
1
2
3
4
5
6
7
8
9
10
int main () {
  int sum = 0;
  for (int x = 1; x <= 14; x++)
  {
    sum+= x*x*x;
  }
  cout << sum;

  return 0; 
}
Thank you so much!!
I completely suck at this stuff and I always post online for help but you are the first person who actually gave me something that works! Thanks again! =)
You're welcome
Topic archived. No new replies allowed.