Difference between revisions of "Mod"
From Mesham
Jump to navigationJump to search (Created page with '== Overview == This mod[n,x] function will divide ''n'' by ''x'' and return the remainder. * '''Pass:''' Two integers * '''Returns:''' An integer representing the remainder ==…') |
|||
Line 1: | Line 1: | ||
== Overview == | == Overview == | ||
− | This mod | + | This mod(n,x) function will divide ''n'' by ''x'' and return the remainder. |
* '''Pass:''' Two integers | * '''Pass:''' Two integers | ||
Line 8: | Line 8: | ||
== Example == | == Example == | ||
− | var a:=mod | + | #include <maths> |
− | var | + | var a:=mod(7,2); |
− | + | var y:=mod(a,a); | |
[[Category:Function Library]] | [[Category:Function Library]] | ||
[[Category:Maths Functions]] | [[Category:Maths Functions]] |
Revision as of 12:52, 13 January 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> var a:=mod(7,2); var y:=mod(a,a);