program sqr(input,output); var i : integer; function sq(a:integer):integer; var b,c,d : integer; bc : boolean; Begin if a<=1 then sq:=1 else begin b:=(a DIV 182)+2; d:=0; repeat c:=(b+(a DIV b)) DIV 2; bc:=(b=c) or ((b-c)=d); if not bc then begin d:=c-b; b:=c; end; until bc; if b>c then sq:=b else sq:=c; end; End; BEGIN repeat write('Number:'); readln(i); if i<>0 then writeln('Square root ',i,'=',sq(i)); until i=0; END.