最近刚刚开始学c语言
你肯定不能直接用i来算啊,i算完了除成0了外面循环怎么循环。
int temp = i; while(temp) { if (temp %10 == 9) count ++; temp /= 10; }
while循环不对,是死循环