Your loop will execute as long as ALL inequalities are met. In other words, as soon as ANY of those inequalities become an equality. Therefore, your loop finds the smallest i that's divisible by ANY of {12, 15, 18}.
If you want to find the smallest i that's divisible by ALL of {12, 15, 18}, the loop should continue executing as long as ANY of the inequalities are true.