#include <stdio.h> int main() { int a,b,i; printf("请输入一个数:"); scanf("%d",&a); b = a; for (i = b % 10; i != 0; i = b % 10) { b = b/10; printf(" %d ",i); } printf("\n"); return 0; }