Hi nico,
We know % always return the remainder after division
so for 8%5 we do 8/5 and take the remainder as our modulo (we know its 3)
or in other words we do,
5*(some-possible-integer)+rr=8 and take the rr value here as our modulo.here it comes out as 5*(1)+3 and we take rr as the modulo here rr=3
for 5%8 it becomes 5*(some-possible-integer)+rr where rr is the remainder
and that possible integer is 0,

so here rr has to be 5.... ie modulo is 5
or putting it otherwise, (smallNo)%(bigNumber)==>(smallNo)
likewise there...