输入一个数,从高位向低位输出,如:输入12345,输出1  2  3  4  5

程序:

#include<stdio.h>

int main()

{

    int i=0;

    char s[1000000];

    gets(s);

    while(s[i]!=0)

    {

        printf("%c\n",s[i]);

        i++;

    }

    return 0;

}

结果:

12345

1

2

3

4

5

 

 

 

             Press any key to continue

234567

2

3

4

5

6

7




             Press any key to continue