I notice that both ChatGPT and CoPilot give this exact solution. Only after being told that it doesn't terminate, they conjure something like for (unsigned i = 9; i + 1 0; --i) but never the good solution.