HOW CAN YOU USE MODULO : - cook the code

Tuesday, 19 September 2017

HOW CAN YOU USE MODULO :

HOW CAN YOU USE MODULO :

Some properties of modulo ..

1. ( a + b ) % c = ( ( a % c ) + ( b % c ) ) % c
2. ( a * b ) % c = ( ( a % c ) * ( b % c ) ) % c
3. ( a – b ) % c = ( ( a % c ) – ( b % c ) ) % c 
4. ( a / b ) % c NOT EQUAL TO ( ( a % c ) / ( b % c ) ) % c
5. (a / b ) % c = ( a * b^ -1 ) % c

No comments:

Post a Comment