title: How to increment by constant number while summing numbers in Labview?
body: <p>I just started learning Labview today, and have been doing a lot of online searching and looking at example code. However, I still find myself stuck on some simple concepts.</p>
  
  <p>Currently I'm trying to write a simple code that sums up all the numbers less than or equal to <code>N</code> that are multiples of both 3 and 5. Here is an image of what I have right now. I feel like it's close, but that I'm missing a key aspect to make the loop add up all the numbers that pass this criteria (instead of just the last one).</p>
  
  <p><a href="https://i.stack.imgur.com/9gZHs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9gZHs.png" alt=""></a></p>
  
  <p>To try to walk you through it -- I have a for loop, and I start by specifying some number <code>N</code> (or rather N+1) that I went to iterate to. I also set <code>i</code> to equal 5, so that I start iterating through with the number 5 (I think) and continue in multiples of 5. Then, I divide the input number by 3, and check if the remainder is equal to 0 or not. If it is, then it's a multiple of 3 as well, so a boolean gets set to True and I add this number to my final sum (+0, because I didn't know what else to put there). If it's not, I just add 0. The final sum is then calculated.</p>
  
  <p>If I start with N=16 in the top left, my "final sum" indicator says 15, which is correct because 15 is the only number from 5-15 that is a multiple of both 3 and 5. However, if I try 1001 for example, my "final sum" indicator says 0. So I think it is only performing these checks and sums for the last number in the loop -- or all the previous results are getting overwritten. I'm not sure how to fix this though (I tried a shift register but then deleted it because I think that would bring my final sum to the input of the new loop, which isn't what I want). Any help is appreciated!</p>