#include
void main()
{
int n,temp,array[100];
int i,k;
printf("please input n :\n");
scanf("%d",&n);
temp=n;
for(k=0;temp!=0;k++)
temp=temp/10;
for(i=k-1;i>=0;i--)
{
array[i]=n%10;
n=n/10;
}
printf("the out numbers :");
for(i=0;i printf("%d,",array[i]); printf("\b."); } /*Visual c++ 中已调试成功,如图所示*/
#include "stdio.h"
void OutputNumber(int iNumber)
{
if( iNumber < 10 )
printf("\n%d",iNumber);
else
{ OutputNumber(iNumber/10);
printf(",%d",iNumber % 10);
}
}
main()
{
int iNumber;
printf("Print enter a number :");
scanf("%d",&iNumber);
OutputNumber(iNumber);
printf(".");
}