4 ms·
Even so... try dividing. If it looks like division truncates, check the product. If it looks like floating point division, check if rounding/truncation changes
by repsilat 8y ago
Even so... try dividing. If it looks like division truncates, check the product. If it looks like floating point division, check if rounding/truncation changes the value.
Or keep two extra counters that you increment every iteration and reset when they hit 3 or 5.
Not knowing modulus or bitwise ops etc isn't a good sign, but it isn't disqualifying. Not being able to get fizzbuzz working should be disqualifying, though, unless you're willing to teach someone to program completely.