This content has been marked as final.
Show 5 replies

1. Re: 'divisible by' help: how do you write 'a number is divisible by 6'?
Ned Murphy Mar 23, 2012 4:17 AM (in response to screeen)You can use the modulus operator, which produces the remainder after dividing by a number...
if(number%6 == 0){
that being true says the number is divisible by 6

2. Re: 'divisible by' help: how do you write 'a number is divisible by 6'?
dmeN Mar 23, 2012 4:17 AM (in response to screeen)1 person found this helpfulI don't know what your variables mean but you can see if a number is evenly divisible by another number using mod:
if(score % 6 == 0){

3. Re: 'divisible by' help: how do you write 'a number is divisible by 6'?
dmeN Mar 23, 2012 4:18 AM (in response to dmeN)1 person found this helpfulAw, Ned ya beat me  same minute even!

4. Re: 'divisible by' help: how do you write 'a number is divisible by 6'?
screeen Mar 23, 2012 4:24 AM (in response to dmeN)thanks folks!!

5. Re: 'divisible by' help: how do you write 'a number is divisible by 6'?
Ned Murphy Mar 23, 2012 5:22 AM (in response to screeen)You're welcome