给一个不多于5位的正整数,要求:①求出它是几位数;②分别输出每一位数字;③按逆序输出各位数字,例如原数为321,应输出123.

#include<stdio.h> int PrintReverse(int n)//倒序 { printf("按逆序输出各位数字:"); while(n!=0) { printf("%d ",n%10); n/=10; } printf("\n"); return n; } int Count(int n) { int d=PrintReverse(n); int t=0; if(n==0)
相关文章
相关标签/搜索