View Code of Problem 77

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

Double click to view unformatted code.


Back to problem 77