# TITLE: Units in Zn # AUTHOR: Roy F.A. Maclean # EMAIL: rfamgm at gmail # WEB: http://www.spiderpixel.co.uk/caspro # DATE: 18Jun1996, 6Jun1999, 3Jul2007 # MAKE: CASIO # MODEL: fx6300G or greater # NOTES: Enter a positive number N, then all # the units in the ring (Zn,+,.) will be displayed # where . denotes multiplication modulo n. @@ Program "ZUNIT" Lbl 0 ?->N:1->M Lbl 1 N->X:M->Y Lbl 2 X-Y*Int (X/Y)->R Y->X:R->Y Y<>0=>Goto 2 X=1=>M_ Isz M M<>N=>Goto 1 Goto 0