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

AC了,晒PASCAL代码

Posted by mountain_fly at 2011-03-27 17:02:18 on Problem 1298
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:
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