Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re:D不一定是4In Reply To:希望指点,题简单,就是语言不熟。如何结束输入!怎么结束!谢谢 Posted by:X_CrDjN at 2006-07-18 11:23:03 > #include <stdio.h> > main() > {int a,b,c,d,x=0,y=0,z=0,v=0; > while(scanf("%d%d%d%d",&a,&b,&c,&d)!=EOF) > {x+=a;y+=b;z+=c;v+=d; > if(x>10) x%=10;if (y>10) y%=10;if (z>10) z%=10;if (v>10) v%=10; > printf("%d%d%d%d",x,y,z,v); > } > printf("%d%d%d%d",x,y,z,v); > } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator