View Code of Problem 77

#include<stdio.h>
void main()
{
    int a[4],n, i=0;
    scanf("%d", &n);
    while(i<4)
    {
        a[i] = n%10;
        n = n/10;
        i++;
    }

    for(i=3; i>=0; i--)
    {
        printf("%d", a[i]);
        if(i>0)
            printf(" ");

    }

}

Double click to view unformatted code.


Back to problem 77