Search found 2 matches

by Zhichao Li
Sun May 05, 2002 11:04 am
Forum: Volume 2 (200-299)
Topic: 272 - TEX Quotes
Replies: 136
Views: 56488

Problem 272: TeX Quotes

Could you tell my why I got wrong answers?

[pascal] {$E+,I-,N+,Q-,R-,S-}

var
c:char;
ch:char;

begin
c:='`';
while not(eof(input)) do
begin
read(ch);

if ch='"' then
begin
write(c,c);
if c='`' then c:=''''
else c:='`';
end
else write(ch);
end;
end.[/pascal]
by Zhichao Li
Sun May 05, 2002 10:20 am
Forum: Volume 7 (700-799)
Topic: 756 - Biorhythms
Replies: 32
Views: 13706

756 - Biorhythms

I got wrong answers. Would you please tell me why?

[pascal]
{$E+,I-,N+,Q-,R-,S-}

var
a,b,c,d,s:longint;
ccase:longint;
begin
ccase:=0;

repeat
ccase:=ccase+1;

read(a,b,c,d);
if a+b+c+d=-4 then exit;
a:=a mod 23;
b:=b mod 28;
c:=c mod 33;

s:=a*28*33*6+b*23*33*19+c*23*28*2;
if s>=23 ...

Go to advanced search