javscript smallest number greater than or equal to N divisible by K code example
Example: javscript smallest number greater than or equal to N divisible by K
// Function to find the smallest number greater than or equal to N that is divisible by K
function findNum(N, K)
{
var rem = (N + K) % K;
if (rem == 0) return N;
else return N + K - rem;
}