Tom Clarke wrote: > How would i go about making Ruby count to say 1000 usin only multiples > of say 2 and 6. Then i am looking to add all of the outputted numbers. > Can anyone help If you want numbers that are divisible by 2 *or* 6, then that is all even numbers. If you want numbers that are divisible by 2 *and* 6, then that you really need only to check multiples of 6. Why can't you use something like this: 6.step(1000, 6) You need only start with 6 to find multiples. Every sixth number will be a multiple. -- Posted via http://www.ruby-forum.com/.