View Code of Problem 77

#include<stdio.h>
int main()
{
	int x,i=1;
	scanf("%d",&x);
	int temp = x;
	temp/=10;
	while(temp>0)
	{
		temp/=10;
		i*=10;
	}
	do{
		int d = x/i;
		if(i>1)
		{
			printf("%d ",d);
		}
		else
		{
			printf("%d",d);
		}
		x%=i;
		i/=10;
	}while(i>0);
	return 0;
}

Double click to view unformatted code.


Back to problem 77