|
|
вернуться в форумwhy i got CE???? const p=3.1415926535897932384626433832795; var arccos,x,as,at,ah,a,b,l,r:real; begin read(l,r); if r>=l*sqrt(2) then writeln(l*l:0:3) else if r<=l / 2 then writeln(p*r*r:0:3) else begin x:=l/(2*r); b:=l/2; ArcCos := ArcTan (sqrt (1-sqr (x)) /x); as:=arccos*r*r; at:=b*sqrt(r*r-b*b); ah:=as-at; a:=p*r*r; a:=a-4*ah; writeln(a:0:3); end; end. i tested it with BP 7.0 and FP 1.0.10 both on windows... what's wrong? "as" is a reserved word. 754129 18:57:25 7 фев 2005 TECTOBOP 1084 Pascal Wrong Answer 6 0.015 143 КБ Re: why i got CE???? Послано Toster 18 сен 2006 03:29 1.'as' is keyword like 'while' or 'if' 2.to have AC 'if r>=l*sqrt(2) then' ---> 'if r>=l*sqrt(2)/2 then' |
|
|