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 |
AC了,晒PASCAL代码program poj1298; const b:Array[1..26]of char=('V','W','X','Y','Z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U'); var s:string; i,x:longint; c:char; begin readln(s); repeat readln(s); for i:=1 to length(s) do begin c:=s[i]; if (ord(c)>=65)and(ord(c)<=90) then begin c:=b[ord(c)-64]; s[i]:=c; end; end; writeln(s); readln(s); readln(s); until s='ENDOFINPUT'; end. Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator