how to tell if a number is divisible by 10, or 20 etc?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
Murica
Posts: 29
Joined: 27 Nov 2022, 17:28

how to tell if a number is divisible by 10, or 20 etc?

Post by Murica » 29 Nov 2022, 12:15

Code: Select all

q::
divisible_check("420","20")
return

divisible_check(n,n2)
 { if magic 
   return,"n1 is divisible by n2"
 }
[Mod edit: [code][/code] tags added.]

thank you.

User avatar
mikeyww
Posts: 26848
Joined: 09 Sep 2014, 18:38

Re: how to tell if a number is divisible by 10, or 20 etc?

Post by mikeyww » 29 Nov 2022, 12:48

Code: Select all

q::MsgBox, % !Mod(420, 20)
r::MsgBox, % !Mod(420, 22)
Explained: Mod


teadrinker
Posts: 4325
Joined: 29 Mar 2015, 09:41
Contact:

Re: how to tell if a number is divisible by 10, or 20 etc?

Post by teadrinker » 29 Nov 2022, 17:07

I don't think that the solution by the link is optimal, hehe

Post Reply

Return to “Ask for Help (v1)”