| 
 | 
вернуться в форумThank Niculas ... i found where everyone mistakes! look... you should notice that it might   trunc(31)=30 and its frac (i.e. frac(31)=30)!!!! which i never understand why but allways:   trunx(x)+frac(x)=x Sincerely Aidin_n7@hotmail.com       var   p,q,qx              :real;   i                   :integer; begin   read(p);  p:=p/100;   read(q);  q:=q/100;   for i:=1 to 11000 do   begin     qx:=q*i;     if frac(qx)=0 then qx:=qx-1        else qx:=trunc(qx);     if trunc(p*i)<qx then       begin writeln(i); exit; end;   end; end.  |  
  | 
|