Interest in Pascal (2)

Look at this Pascal (pseudocode) below :

 function secret(x, y, z : longint) : longint;
 begin
      if (y = 0) then
           secret := 1 mod z
      else
           secret := (x * secret(x,y-1,z)) mod z
 end;

What is the value of \(secret(8,5,7)\) ?

×

Problem Loading...

Note Loading...

Set Loading...