Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
codeIn Reply To:Why WA Posted by:My_loves at 2005-11-09 20:50:55 program p2707; var a,b,c,d:integer; out:real; procedure swap(var x,y:integer); var i:integer; begin i:=x; x:=y; y:=i; end; begin repeat readln(a,b,c,d); if a=0 then halt; if b>a then swap(a,b); if d>c then swap(c,d); out:=c/a; if d/b<out then out:=d/b; if out>=1 then out:=1; out:=trunc(out*100); writeln(out:0:0,'%') until false;; end. Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator