Hello guys.

Im just starting out with programing in C and i got a task that i dont know how to do.

The task is as follows :

Write a program in C that will calculate S for the input value of n:

http://i23.photobucket.com/albums/b3...pressorX/1.jpg

The problem im having is how do i, if the value for n is for example 5, do the calculations for all the numbers <=5 (1,2,3,4,5). That is how do i write a code that will for any value given do the calculations on all the numbers from 1 to the value given calculate the factorials for each one and then calculate S using the formula on the image.

Seems to be a hell of a task for someone who is just starting with C :\
Anyway if anyone could help clarify this i would be very grateful.

Cheers.