View Code of Problem 77

#include <stdio.h>

int main()
{
    int s[4],n,t;
    scanf("%d",&n);
    int i=0;
    while(n!=0)
    {
        t=n%10;
        s[i]=t;
        n/=10;
        i++;
    }
    for(int i=3;i>0;--i)
    {
        printf("%d ",s[i]);
    }
    printf("%d",s[0]);
    return 0;
}

Double click to view unformatted code.


Back to problem 77