#include<stdio.h>
int main(void)
{
int n,num,i=0;
printf("Input the positive num\n");
scanf("%d",&num);
if(num<=0)
{
printf("plsase input a positive num\n");
return 0;
}
while(num!=0)
{
n=num%10;
printf("%d",n);
num=num/10;
i++;
}
printf("\nThe num has %d bit\n",i);
}
[
本帖最后由 Spygg 于 2010-6-6 21:28 编辑 ]