View Single Post
Old May 12th, 2008, 1:11 PM   #6
JAlexBrown
Newbie
 
Join Date: May 2008
Posts: 11
Rep Power: 0 JAlexBrown is on a distinguished road
Re: count multiples of 6 between two numbers given by the user.

I agree with titaniumdecoy...don't use a do...while loop. Use a while loop (or I suppose a for loop would work in this case as well). Also, have X and Y be input. You could use a scanner or you could use a JOptionPane. Also, why do you increment X before you check to see if it's a multiple of six?
JAlexBrown is offline   Reply With Quote