REM Find the order of a number in a multiplicative group REM Robert Campbell, 970701 INPUT "number = "; thenumber& INPUT "modulus = "; themod& thepower& = thenumber& FOR theorder& = 2 TO themod& - 1 thepower& = (thepower& * thenumber&) MOD themod& IF (thepower& = 1) THEN PRINT thenumber&, " has order ", theorder& STOP END IF NEXT theorder& END