感覺著出題的人腦殘了,搞個這樣的格式又不說清楚,
輸出格式應該是這樣的:
#include<iostream> int main() { long int n,a,b; int c=0; while(scanf("%d",&n)!=EOF) { int s=0; while(n) { a=n%10; if(a%2==0) s=s+a; n=n/10; } c++; if(c==1) printf("%d\n",s); else printf("\n%d\n",s); } return 0;