#include<stdio.h> int shu(int n) { int i,j,a[5]; i=0; while(n) { a[i++]=n%10; n=n/10; } for(j=i-1;j>0;j--) printf("%d ",a[j]); printf("%d",a[0]); return 0; } int main() { int n; scanf("%d",&n); shu(n); } |
Double click to view unformatted code.