997799 wrote:Try adding more System.out statements in between to see what the results of the different calculations are; then you may figure out where you are confused.
c += a * b;
what is the result
997799 wrote:What do you think it is?
c += a * b;
what is the result
baftos wrote:Deja vu!997799 wrote:Try adding more System.out statements in between to see what the results of the different calculations are; then you may figure out where you are confused.
c += a * b;
what is the result
Also: you know what the modulo ( % ) operator actually does right? If not you will want to look that up in your book. I assume you have one, since this looks very much like a homework assignment. If you don't you should really get one.