I need to compute the sum of 1 + 1 * 2 + 1 * 2 * 3.... n (n being the number). so if n was 5 it would be 1 + 1 * 2 + 1 * 2 * 3 + 1 * 2 * 3 * 4 + 1 * 2 * 3 * 4 * 5 (exiting at 5). so far I got this, but i need correction on my for loop because I think it is wrong.

#include <stdio.h>

main ()

{

long n, i, sum=0;

printf ("enter number to be summed");

scanf ("%d", &n);

for (i=1; i <=n,i++)

I'm not too sure what to put for the sum I was thinking maybe sum+= i * i but that doesn't look right. maybe i should set sum to 1? any help would be appreciated.