Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

希望指点,题简单,就是语言不熟。如何结束输入!怎么结束!谢谢

Posted by X_CrDjN at 2006-07-18 11:23:03 on Problem 2316
#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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator