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

Re:Pascal的请进.

Posted by wuzhuofeng at 2011-11-09 12:30:08 on Problem 1470
In Reply To:Pascal的请进. Posted by:minmax at 2011-08-09 19:58:38
> function getnum:longint;
> var   c:char;
>       x:longint=0;
> begin
>       read(c);
>       while not (c in num) do read(c);
>       while c in num do
>       begin
>             x:=x*10+ord(c)-48;
>             read(c);
>       end;
>       exit(x);
> end;
> 
> 用上面的函数代替read.每次读入一个数.
> num:set of char=['0'..'9'];
写得很好,顶一个

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