View Code of Problem 54

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

Double click to view unformatted code.


Back to problem 54