|
|
вернуться в форумMy AC program (do not see it if you want to think without help) var a,r:integer; az,s,stru,b:real; function ArcCos ( X : Real ): Real; var tmpArcCos : Real; begin if X = 0.0 then tmpArcCos := Pi / 2.0 else tmpArcCos := ArcTan ( Sqrt ( 1 - X * X ) / X ); if X < 0.0 then tmpArcCos := Pi - tmpArcCos; ArcCos := 180*tmpArcCos/pi; end; begin readln(a,r); if a/2>=r then writeln(pi*r*r:1:3) else if sqrt(2)/2*a<=r then writeln(a*a) else begin az:=2*arccos((a/2)/r); s:=pi*r*r*az/360; b:=2*sqrt((r-a/2)*(r+a/2)); stru:=a/4*b; s:=s-stru; s:=pi*r*r-4*s; writeln(s:1:3); end; readln; end. Re: My AC program (do not see it if you want to think without help) Послано oybek 17 май 2014 17:51 Edited by author 17.05.2014 17:52 Re: My AC program (do not see it if you want to think without help) Послано oybek 17 май 2014 17:51 It is easy to put your code, where nothing is clear and say: "Look idiots, how clever I am". Try to help people, instead of showing off yourself. |
|
|