×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
• Talk With Other Members
• Be Notified Of Responses
• Keyword Search
Favorite Forums
• Automated Signatures
• Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

#### Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

# multiple of 10

## multiple of 10

(OP)
if i had a number in a variable how could i check it to see if its a multiple of 10 (10,20,140,900,etc..) i figure if i divide the number by 10 and it makes a whole number it will be a multiple, but how could i check the number to see if it is a whole number?

any help or comments will be apreciated.

~Tony

### RE: multiple of 10

use the 'int' function to see if you have a decimal portion

or

pattern match it like this....

would $mod = null, empty, or 0? ### RE: multiple of 10 x % y returns the remainder of x / y. 100/10=10 with a remainder of 0, so 100%10=0 yes, you can set$mod = 100 % 10... it will equal 0.

Sincerely,

Tom Anderson
CEO, Order amid Chaos, Inc.
http://www.oac-design.com

#### Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

#### Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Close Box

# Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!