得到任意数字的各个数位

Posted expedition

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了得到任意数字的各个数位相关的知识,希望对你有一定的参考价值。

#include<stdio.h>
void getW(int x)
    while(x != 0)
        int d = x %10;
        printf("%d ",d);
        x /= 10;
    
    printf("\n");


int main()
    int n;
    while(true)
        scanf("%d",&n);
        getW(n);
    
    return 0;

 

以上是关于得到任意数字的各个数位的主要内容,如果未能解决你的问题,请参考以下文章