Difference between revisions of "Mod"

From Mesham
Jump to navigationJump to search
m
Line 9: Line 9:
  
 
  #include <maths>
 
  #include <maths>
  var a:=mod(7,2);
+
   
var y:=mod(a,a);
+
function void main() {
 +
    var a:=mod(7,2);
 +
    var y:=mod(a,a);
 +
};
  
 
''Since: Version 0.41b''
 
''Since: Version 0.41b''

Revision as of 14:36, 15 April 2013

Overview

This mod(n,x) function will divide n by x and return the remainder.

  • Pass: Two integers
  • Returns: An integer representing the remainder

Example

#include <maths>

function void main() {
   var a:=mod(7,2);
   var y:=mod(a,a);
};

Since: Version 0.41b