3 minutes ago, Fasauceome said:
What language is this? Have you tried b+=a?
Its java, basically the same thing as c#.
I haven't but I just solved it. int b = 0; needed to be declared outside of the loop because it reset b back to 0 every time it looped