Minimum decrements to make integer A divisible by integer B | C # implementation to count total numbers moves to make integer A divisible by integer B ; Function that print number of moves required ; Calculate modulo ; Print the required answer ; Driver code ; Initialise A and B
using System ; class GFG { static void movesRequired ( int a , int b ) { int total_moves = a % b ; Console . Write ( total_moves ) ; } public static void Main ( String [ ] args ) { int A = 10 , B = 3 ; movesRequired ( A , B ) ; } }