Wednesday, November 26, 2014

separate each number from a big number

separate each number from a big number

 

#include<stdio.h>
main()
{
    int n,k;
 
    scanf("%d",&n);
    for(;n!=0;n=n/10)
    {
        k=n%10;
        printf("%d\n",k);
    }
}

No comments:

Post a Comment