I found this awesome site "www.projecteuler.com" and for the first problem I decided to do something more complex than asked, the question is actually simple. "If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.
Find the sum of all the multiples of 3 or 5 below 1000."
I started to write this program to do it for any numbers but for some reason my output is messed up, the number is huge negative or positive. I am at a loss.
At lines 31 and 37, the third part of your for statement is badly formed. It doesn't change the value of i, so i will always be 0, so your loops will run forever.