This is supposed to compute iMax^3 + iMax-1^3 + iMax-2^3...1^3
Instead, it doesn't . How can i add up the terms in my for loop? It is setup so it only adds iMax^3 and iMax-1^3, but i don't know how to fix it.

#include <stdio.h>
#include <math.h>
void cube(void);
int main(void)
{
cube();
return 0;
}

void cube(void)
{ int iMax, iAns, iCube, iNumber;
printf("input max integer: ");
scanf("%i", &iMax);
iAns = pow(iMax,3);
for (iNumber=1; iNumber <iMax; iNumber++)
iCube = pow(iNumber,3) + pow(iMax,3);
printf("Cube is : %i", iCube);
}