I did problem 1 in python and got the correct answer, 233168.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
metulburr@ubuntu:~$ python3
Python 3.3.1 (default, Apr 17 2013, 22:30:32)
[GCC 4.7.3] on linux
Type "help", "copyright", "credits" or "license"for more information.
>>> lister = []
>>> for i in range(1000):
... if i % 5 == 0:
... lister.append(i)
... elif i % 3 == 0:
... lister.append(i)
...
>>> sum(lister)
233168
>>>
Using the same strategy in c++ i get a different answer, 234168. I am not sure what i did to get a different answer?