View Code of Problem 77

#include<stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>

int main()
{
    int a,b[10],k=0;
    scanf("%d",&a);
    while(a>0){
        b[k++]=a%10;
        a/=10;
    }
    for(int i=k-1;i>=0;i--){
        printf("%d",b[i]);
        if(i!=0){
            printf(" ");
        }
    }
	return 0;
}

Double click to view unformatted code.


Back to problem 77