|
|
|
|
|
by contravariant
4069 days ago
|
|
That's not really an optimal way to check divisibility though, if you want to be quick try: fizz = (uint)i*2863311531 <= (uint)i;
buzz = (uint)i*3435973837 <= (uint)i;
Should work for fine for i<=1000.Edit: changed "<" to "<=", otherwise it fails when i=0. |
|