Next Number Greater Than A and B and Divisible by B

Published by MattDESTROYER in

You are given two numbers a and b. Create a function that returns the next number greater than a and b and divisible by b.

Examples

DivisibleByB(17, 8) ➞ 24

DivisibleByB(98, 3) ➞ 99

DivisibleByB(14, 11) ➞ 22

Notes

a will always be greater than b.

Watch a quick demo on how Edabit works.