|Edit:Beaten to it....|
Since this looks like all the numbers are supposed to be positive I would suggest unsigned int types.
You will also need to set a limit for the input number, because if i understand correctly you plan to output the sum of all even numbers less than the input. This could easily exceed the capacity of the variables if a fairly large number is input.
It may help to use a larger int type like an unsigned long int or unsigned long long int, but you will still need to work out a limit on input numbers.
The rest is fairly simple with a loop and counter(there may be an equation to work it out in a single step but haven't looked into it).