Aftertouch Posted July 14, 2017 Posted July 14, 2017 Hello all, How can i check if a number is a mutiple of another number.... Like.. (Setq test 18) (Setq checknumber 6) (If (= test *multiple of* checknumber) Return a true, since 18 is a multiple of 6?? Thanks in advance! ;-) Quote
handasa Posted July 14, 2017 Posted July 14, 2017 (setq test 18) (setq checknumber 6) (if (= (fix (/ test checknumber)) (/ test checknumber)) (alert (rtos (/ test checknumber) 2 0))) Quote
tombu Posted July 14, 2017 Posted July 14, 2017 (=(*(/ test checknumber)checknumber) test) should work for integers. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.