View Code of Problem 54

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

Double click to view unformatted code.


Back to problem 54