C语言编程题:怎样逆序输出数字
*********您好!Yadie.23很高兴能为你解答。*********+++++++++++++++++++++++++++++++++++++++++++++++++while(num>=0){pRintf("%d",num%10);num=num/10;}+++++++++++++++++++++++++++++++++++++++++++++++++You can haVe a try,maybe my answer usefuL to you.如满意,Yadie.23十分感谢您的采纳。*^-^*int n=123;//输入的数字int put[255];int count=0for(int i=0;;i++)put[i]=n;count++;if(n==0)break;for(int j=0;j
C语言:数字反转怎么编程
大概的思路是这样--按位剥离这个数,每剥离一次给他乘10再加上剥离出来的个位数,然后进行迭代。
intnum;
scanf("%d",&num);
inttemp=0;
while(num!=0){
temp=temp*10+num%10;
num=num/10;
printf("反转之后的数为:%d",temp);