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

呵呵,如果eof也定义为-1了,就可以

Posted by hawk at 2004-03-01 16:30:34 on Problem 1555
In Reply To:这样 Posted by:hz02ruc at 2004-03-01 15:43:56
就怕eof定义不一样呢
> int init()
> {
> 	int num;
> 	if(scanf("%d",&num)==EOF) return 0;
> 	coef[9]=num;
> 	for(int i=8;i>=1;i--)
> 		scanf("%d",&coef[i]);
> 	return 1;
> }
> 
> int main()
> {
>     while (init())
>     {
>         .....
>     }
>     return 0;
> }

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