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:贴代码

Posted by demaxiya at 2012-08-21 09:24:21 on Problem 2328
In Reply To:贴代码 Posted by:1004115224 at 2012-08-13 15:53:51
var
n,i,j,low,high:integer;
s:string;
begin
low:=0;
high:=11;
while true do
begin
readln(n);
if n=0 then exit;
readln(s);
if (s='right on') and (n<high) and (n>low) then
begin
writeln('Stan may be honest');low:=0;high:=11;
end
else if (s='right on') then
begin writeln('Stan is dishonest');low:=0;high:=11; end;
if (s='too high') and (high>n) then high:=n;
if (s='too low') and (low<n) then low:=n;
end;
end.
现在还有人用PASCAL吗?
(这代码是AC的)

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