直接写 float a=124.52;int aa=0; a*=10;while((int)a%10)a*=10;a/=10; while((int)a)aa*=10,aa+=(int)a%10,a/=10; while(aa)printf("%d ",(aa%10)),aa/=10;