Download MuPAD from SciFace

MuPAD Pro Computing Essentials - Examples 

Example 9.2 - Arithmetic modulo m

Here is a program producing table of multiplication modulo a given number.  Here the  range = 9.

range := 9:

multmod:= matrix(range,range):
for i from 0 to range-1 do
   for j from 0 to range-1 do
      multmod[i+1,j+1]:=modp(i*j,range)
   end:
end:
 
multmod;
 

You can try to change this program into a proper procedure. This should be quite simple.

TOP