Jump to content

If statement with percentages


Recommended Posts

Link to comment
Share on other sites

; If the modulus operation of $iNb by 2 equals to 0 then $iNb is even.
    If Mod($iNb, 2) = 0 Then
        MsgBox($MB_SYSTEMMODAL, "", $iNb & " is an even number.")
    Else
        MsgBox($MB_SYSTEMMODAL, "", $iNb & " is an odd number.")
    EndIf

 

Kind Regards
Skeletor

"Coffee: my defense against going postal."

Microsoft Office Splash Screen | Basic Notepad Program (Beginner) | Transparent Splash Screen | Full Screen UI

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...