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 |
Pascal的请进.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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator