View Code of Problem 54

#include <stdio.h>
int main()
{
	 int i;
	 int a;
	 int j =1;
	 int k;
	 int b[100];
	 scanf("%d",&a);
	 while(a!=0)
	 {
	 b[i++] =a%10;
		 a = a/10;
	  } 
		for(k=i-1;k>0;k--){
	printf("%d ",b[k]);
}
	printf("%d",b[0]);

	
	return 0;
 } 

Double click to view unformatted code.


Back to problem 54