标签:缩小 int 51cto 思想 数字 clu sys can https
主要思想依旧是取位和调用数字的缩小#include<stdio.h>
#include<stdlib.h>
void print(int n)
{
if (n > 9)
{
print(n / 10);//数的缩小
}
printf("%-4d", n%10);//取位
}
int main()
{
int number;
printf("请输入要打印的数\n");
scanf("%d", &number);
print(number);
system("pause");
return 0;
}
标签:缩小 int 51cto 思想 数字 clu sys can https
原文地址:https://blog.51cto.com/14232799/2377407