Minimum decrements to make integer A divisible by integer B | Function that print number of moves required ; calculate modulo ; print the required answer ; initialise A and B
function movesRequired ( a , b ) { let total_moves = a % b ; document . write ( total_moves ) ; } let A = 10 , B = 3 ; movesRequired ( A , B ) ;