Loading ...
Sorry, an error occurred while loading the content.

36899Re: [libertybasic] MOD

Expand Messages
  • Bill Lopez
    Oct 9, 2008
      From the Helpfile:

      num1 MOD num2

      Description:
      The MOD command returns the remainder when num1 is divided by num2.

      Usage:

      'divide 15 by 4 and return the remainder
      print 15 MOD 4
      print 27 MOD 16

      'produces
      3
      11

      When 15 is divided by 4, the quotient is 3, with a remainder of 3. MOD returns that remainder. When 27 is divided by 16, the quotient is 1, with a remainder of 11. MOD returns that remainder.

      [Non-text portions of this message have been removed]
    • Show all 9 messages in this topic