这样为什么没有错误,可是输入以后,回车不出现结果。
柴锡翠 知名达人 2017-07-24 23:23:57
1827 3 0

#include  <stdio.h>
unsigned long fun(unsigned long  n)
{  unsigned long  x=0, s, i;   int  t;
   s=n;
/**********found**********/
   i=1;
/**********found**********/
   while(0<s<100000000)
   {  t=s%10;
      if(t%2==0){
/**********found**********/
         x=x+t*i;  i=i*10;
      }
       s=s/10;
   }
   return  x;
}
main()
{  unsigned long  n=-1;
   while(n>99999999||n<0)
  { printf("Please input(0<n<100000000): ");  scanf("%ld",&n);  }
  printf("\nThe result is: %ld\n",fun(n));
} 

共 3 个回答

您还没有登录,所以不能回复该问题
我要回复

  • 0

    点赞

  • 扫一扫分享朋友圈

    二维码

  • 分享

相关问题