C语言://输出一个整数的每一位。

//输出一个整数的每一位。
#include<stdio.h>
#include<stdlib.h>

void LYJ(int x)
{
 int n = x % 10;
 while (x != 0)
 {
  n = x % 10;
  x = x / 10;
  printf("%d", n);
 }
}
int main()
{
 int m = 2048;
 LYJ(m);
 system("pause");
 return 0;
}

猜你喜欢

转载自blog.csdn.net/qq_43647265/article/details/86496612
今日推荐