点击打开链接
#include<stdio.h> int main() { int i,sum,n; int flag=0; while(scanf("%d",&n)!=EOF) { sum=0; while(n>0) { i=n%10; if(i%2==0)sum+=i; n/=10; } if(flag==1)printf("\n"); printf("%d\n",sum); flag=1; } return 0; }
posted on 2012-08-06 16:12 Slege 阅读(81) 评论(0) 编辑 收藏 举报
Powered by: 博客园 Copyright © 2024 Slege Powered by .NET 9.0 on Kubernetes