#### Archived

This topic is now archived and is closed to further replies.

# is X divisible by 10?

This topic is 6075 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi, how do I check to see if X is divisible by 10? I assume I need the % operation, however I''m not too good with it. Thanks Scott Email Website
"If you try and don''t succeed, destroy all evidence that you tried."

##### Share on other sites
quote:
Original post by wojtos
Hi, how do I check to see if X is divisible by 10? I assume I need the % operation, however I''m not too good with it.

The modulus (%) operator returns the remainder. Ex. a % b returns the remainder of a/b. If the remainder is zero (a % b == 0) then then a is divisible by b.

##### Share on other sites
groovy, thanks for the help/explanations.

Email
Website

"If you try and don''t succeed, destroy all evidence that you tried."

##### Share on other sites
One thing that might be totally obvious (to me anyway) is that 4%5 would be 4... just something to remember

1. 1
2. 2
Rutin
19
3. 3
4. 4
5. 5

• 14
• 12
• 9
• 12
• 37
• ### Forum Statistics

• Total Topics
631425
• Total Posts
3000014
×