#include <stdio.h> #include <math.h> #include <string.h> int main(){ int i,j=0,k=0,f=0,a,min=0,max=0,q[10][10],temp,sum=0,d[100]; char s[80]; long b, c, z[100]; scanf("%ld",&b); while(b!=0){ c=b%10; b=b/10; z[k++]=c; j++; } for(i=j-1;i>=0;i--){ if(i==0){ printf("%ld",z[i]); }else{ printf("%ld ",z[i]); } } return 0; } |
Double click to view unformatted code.