You have several logical problems:

You are not doing any counting. That is you do not start at one and check if that is divisible by 3 or 5, then check 2, then check 3 etc. Everytime around the...