View Code of Problem 77

#include<stdio.h>
int main()
{
	int n;
	int a[4];
	scanf("%d",&n);
	int k=0;
	while(n)
     {
       	a[k++]=n%10;
       	n=n/10;
     }
	for(int i=3;i>=0;i--)
     {
       	if(i!=0)
             {
             	printf("%d ",a[i]);	
             }
     	else 
               printf("%d",a[i]);
     }
	return 0;
}

Double click to view unformatted code.


Back to problem 77