Wednesday, March 28, 2018

Odd and Even Number Checker in Apple Script

Here is a very simple program that I wrote using Apple Script to check if the given number is an ODD or EVEN number. The code is short and very easy to understand.

 I am currently accepting programming and web development work kindly contact me in the following email address for further details. Thank you.
My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.



Sample Program Output for ODD Number


Sample  Program Output for EVEN Number



Program Listing

# checking for ODD number

# odd and even number checker in apple script
# written by Mr. Jake R. Pomperada, MAED-IT
# March 28, 2018

set val1 to 3

if val1 mod 2 is 0 then
display dialog "The given number " & val1 & " is an " & "EVEN number."
else
display dialog "The given number " & val1 & " is an " & "ODD number."
end if


# checking for EVEN number

# odd and even number checker in apple script
# written by Mr. Jake R. Pomperada, MAED-IT
# March 28, 2018

set val1 to 4

if val1 mod 2 is 0 then
display dialog "The given number " & val1 & " is an " & "EVEN number."
else
display dialog "The given number " & val1 & " is an " & "ODD number."
end if





No comments:

Post a Comment