Re: Ways to check divisibility
Re: Ways to check divisibility
- Subject: Re: Ways to check divisibility
- From: Andrei Tchijov <email@hidden>
- Date: Thu, 17 May 2007 13:48:01 -0400
there is "mod" operation. if it is 0, then answer is yes.
On May 17, 2007, at 1:39 PM, Laine Lee wrote:
Here's one way to check divisibility. What are others?
display dialog "Think of a number between 1 and 42, inclusive."
default answer "16"
set aquotriment to text returned of result
if aquotriment div 4 = aquotriment / 4 then
display dialog aquotriment & space & "is divisible by 4."
else
display dialog aquotriment & space & "isn't divisible by 4."
end if
--
Laine Lee
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (applescript-
email@hidden)
Help/Unsubscribe/Update your Subscription:
40tchijov.com
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden