Minimum positive integer divisible by C and is not in range [ A , B ] | C # implementation of the approach ; Function to return the required number ; If doesn 't belong to the range  then c is the required number ; Else get the next multiple of c starting from b + 1 ; Driver code
using System ; class GFG { static int getMinNum ( int a , int b , int c ) { if ( c < a c > b ) { return c ; } int x = ( ( b / c ) * c ) + c ; return x ; } static public void Main ( ) { int a = 2 , b = 4 , c = 4 ; Console . WriteLine ( getMinNum ( a , b , c ) ) ; } }