码迷,mamicode.com
首页 > 其他好文 > 详细

P56

时间:2014-07-22 22:38:53      阅读:174      评论:0      收藏:0      [点我收藏+]

标签:io   re   c   amp   res   return   

#include<stdio.h>
unsigned long fun(unsigned long n)
{
	unsigned long x=0;int t;
	while(n){
		t=n%10;
		if(n%2==0)
			x=10*x+t;
		n=n/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));
}

P56,布布扣,bubuko.com

P56

标签:io   re   c   amp   res   return   

原文地址:http://blog.csdn.net/u013116579/article/details/38034159

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!