Modulus Program for the TI-82/83

PROGRAM MOD

Input "NUMBER? ", X

Input "MODULUS? ", N

X-N*int(X/N)

The Input function is in the I/O submenu.

The int function is in MATH $|$ NUM. It's the greatest integer function.

The other characters in the program are Alpha characters, or arithmetic symbols like + and *.

Check:

$89 \mod{7} = 5$

$-89 \mod{7} = 2$


Send comments about this page to: Bruce.Ikenaga@millersville.edu.

Bruce Ikenaga's Home Page

Copyright 2005 by Bruce Ikenaga