Smallest number greater than or equal to N divisible by K | C # implementation of the above approach ; Function to find the smallest number greater than or equal to N that is divisible by k ; Driver Code
public class GFG { static int findNum ( int N , int K ) { int rem = ( N + K ) % K ; if ( rem == 0 ) return N ; else return N + K - rem ; } static void Main ( ) { int N = 45 , K = 6 ; System . Console . WriteLine ( " Smallest ▁ number ▁ greater ▁ than ▁ or ▁ equal ▁ to ▁ " + N + " that is divisible by " + K + " ▁ is ▁ " + findNum ( N , K ) ) ; } }