I got this series $S= (1^2 ) - (2^2 ) + (3^2 ) - (4^2 )+...+(-1)^{n+1 }* (n^2 )$
for( i = 1; i < n; i = i + n*n)
count++;
printf("The value of the series is:%d\n", count);
But i get either 1 or 4, i know im doing something really wrong since the series says add than subtract.