Write a recursive function, each a positive integer outputted sequentially taken out from the press to the high number of low order number.
Separated by a space between each digit conventions entered.
Results are as follows:
Input: 12345
Output: 12345
#include<stdio.h>
#include<stdlib.h>
int apart(int a)
{
if(a<10)
{
printf("%d ",a);
}
else
{
apart(a/10);
printf("%d ",a%10);
}
}
int main()
{
int num;
scanf("%d",&num);
apart(num);
system("pause");
return 0;
}