View Code of Problem 77

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

Double click to view unformatted code.


Back to problem 77